Skip to content

Commit dd1354a

Browse files
committed
Use the predefined version of jenkins helpers
1 parent ebc4381 commit dd1354a

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

ci/release/Jenkinsfile

Lines changed: 3 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,9 @@ 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+
def ghReleaseNote = sh('realpath -e release_notes.md 2>/dev/null', returnStdout: true).trim()
233227

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} "
228+
sh ".release/scripts/publish.sh -j ${ghReleaseNote != '' ? '--notes=' + ghReleaseNote : ''} ${env.SCRIPT_OPTIONS} ${env.PROJECT} ${env.RELEASE_VERSION} ${env.DEVELOPMENT_VERSION} ${env.GIT_BRANCH} "
235229
}
236230
}
237231
}

0 commit comments

Comments
 (0)