Skip to content

Commit a478b77

Browse files
committed
Use the predefined version of jenkins helpers
1 parent 9701839 commit a478b77

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

ci/release/Jenkinsfile

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
/*
1010
* See https://github.com/hibernate/hibernate-jenkins-pipeline-helpers
1111
*/
12-
@Library('hibernate-jenkins-pipeline-helpers@1.17') _
12+
@Library('hibernate-jenkins-pipeline-helpers') _
1313

1414
import org.hibernate.jenkins.pipeline.helpers.version.Version
1515

@@ -223,15 +223,10 @@ pipeline {
223223
withEnv([
224224
"DISABLE_REMOTE_GRADLE_CACHE=true"
225225
]) {
226-
def notesFiles = findFiles(glob: 'release_notes.md')
227-
if ( notesFiles.length < 1 ) {
228-
throw new IllegalStateException( "Could not locate `release_notes.md`" )
229-
}
230-
if ( notesFiles.length > 1 ) {
231-
throw new IllegalStateException( "Located more than 1 `release_notes.md`" )
232-
}
226+
sh "pwd"
227+
def ghReleaseNote = sh('realpath -e release_notes.md 2>/dev/null', returnStdout: true).trim()
233228

234-
sh ".release/scripts/publish.sh -j --notes=${notesFiles[0].path} ${env.SCRIPT_OPTIONS} ${env.PROJECT} ${env.RELEASE_VERSION} ${env.DEVELOPMENT_VERSION} ${env.GIT_BRANCH} "
229+
sh ".release/scripts/publish.sh -j ${ghReleaseNote != '' ? '--notes=' + ghReleaseNote : ''} ${env.SCRIPT_OPTIONS} ${env.PROJECT} ${env.RELEASE_VERSION} ${env.DEVELOPMENT_VERSION} ${env.GIT_BRANCH} "
235230
}
236231
}
237232
}

0 commit comments

Comments
 (0)