Skip to content

Commit ae48818

Browse files
Steve RamageSJrX
authored andcommitted
ci: Resolves #256 - Rebuild systemd metadata nightly
1 parent 7d5cd78 commit ae48818

File tree

4 files changed

+19
-1
lines changed

4 files changed

+19
-1
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ jobs:
4343
${{ runner.os }}-gradle-
4444
- name: Build with Gradle
4545
run: |
46+
mkdir -p ./build
47+
./generate-changelog > build/CHANGELOG
4648
./gradlew composeUp
4749
./gradlew test buildPlugin
4850
./gradlew --stop

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ License
6565

6666
## Development Notes
6767

68+
### Commit Format
69+
70+
This has adopted [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) format for commit messages, in theory anyway.
71+
The main effect is that certain tags will be excluded from the automatic changelog.
72+
6873
### System Requirements
6974

7075
Java 17

ci/release.Jenkinsfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44

55
def buildDate = new Date().format("yyMMdd", TimeZone.getTimeZone('UTC'))
66

7+
cron_string = ""
8+
9+
// Build nightly on a release branch
10+
11+
if (BRANCH_NAME ==~ /^([0-9][0-9][0-9].x)$/) {
12+
cron_string = "H 1 * * *"
13+
}
14+
715
def buildPodDefinition(workerPodImage, ciUtilsEnabled, kanikoEnabled) {
816
// language=yaml
917
yaml = """
@@ -108,6 +116,9 @@ pipeline {
108116
quietPeriod(1)
109117
//skipDefaultCheckout()
110118
}
119+
triggers {
120+
cron(cron_string)
121+
}
111122
agent none
112123

113124
stages {

generate-changelog

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ SYSTEMD_MESSAGE=$(echo "<li><b>[$SYSTEMD_DATE]</b> Update of systemd unit metada
66

77
echo "<h3>Changes</h3>"
88
echo "<ul>"
9-
{ git log --format="%H %aE" | grep -v dependabot | head -n 20 | cut -d ' ' -f 1 | xargs -d "\n" -n 1 git log -n 1 "--pretty=format:<li><b>[%ad]</b> %s</li></br>%n" --date=format:%Y-%m-%d | sed -E "s%#([0-9]+)%\<a href='https://github.com/SJrX/systemdUnitFilePlugin/issues/\1'>#\1</a>%g"; echo $SYSTEMD_MESSAGE; } | sort -r
9+
{ git log --format="%H %aE" | grep -v dependabot | head -n 100 | cut -d ' ' -f 1 | xargs -d "\n" -n 1 git log -n 1 "--pretty=format:<li><b>[%ad]</b> %s</li></br>%n" --date=format:%Y-%m-%d 2> /dev/null | grep -v -E "</b> (ci|chore|docs|build|style|refactor|test):" | head -n 20 | sed -E "s%#([0-9]+)%\<a href='https://github.com/SJrX/systemdUnitFilePlugin/issues/\1'>#\1</a>%g"; echo $SYSTEMD_MESSAGE; } | sort -r
1010
echo "</ul>"

0 commit comments

Comments
 (0)