Skip to content

Commit 11afe47

Browse files
committed
HHH-18861 - Improve GitHub release announcement body for automated releases
1 parent eb01cd0 commit 11afe47

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

ci/release/Jenkinsfile

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -151,16 +151,6 @@ pipeline {
151151
env.RELEASE_VERSION = releaseVersion.toString()
152152
env.DEVELOPMENT_VERSION = developmentVersion.toString()
153153

154-
155-
def notesFiles = findFiles(glob: 'release_notes.md')
156-
if ( notesFiles.length < 1 ) {
157-
throw new IllegalStateException( "Could not locate `release_notes.md`" )
158-
}
159-
if ( notesFiles.length > 1 ) {
160-
throw new IllegalStateException( "Located more than 1 `release_notes.md`" )
161-
}
162-
env.SCRIPT_OPTIONS = " --notes=${notesFiles[0].path}"
163-
164154
if ( params.RELEASE_DRY_RUN ) {
165155
env.SCRIPT_OPTIONS += " -d"
166156
}
@@ -265,8 +255,17 @@ pipeline {
265255
steps {
266256
script {
267257
checkoutReleaseScripts()
258+
259+
def notesFiles = findFiles(glob: 'release_notes.md')
260+
if ( notesFiles.length < 1 ) {
261+
throw new IllegalStateException( "Could not locate `release_notes.md`" )
262+
}
263+
if ( notesFiles.length > 1 ) {
264+
throw new IllegalStateException( "Located more than 1 `release_notes.md`" )
265+
}
266+
268267
withCredentials([string(credentialsId: 'Hibernate-CI.github.com', variable: 'GITHUB_API_TOKEN')]) {
269-
sh ".release/scripts/github-release.sh ${env.SCRIPT_OPTIONS} ${env.PROJECT} ${env.RELEASE_VERSION}"
268+
sh ".release/scripts/github-release.sh ${env.SCRIPT_OPTIONS} --notes=${notesFiles[0].path} ${env.PROJECT} ${env.RELEASE_VERSION}"
270269
}
271270
}
272271
}

0 commit comments

Comments
 (0)