Fix snapshot publish configuration file reading

This commit is contained in:
Christian Beikov 2022-05-12 09:24:46 +02:00
parent 9adc0f2e04
commit d5bcca655e
1 changed files with 2 additions and 4 deletions

View File

@ -2,7 +2,6 @@
* See https://github.com/hibernate/hibernate-jenkins-pipeline-helpers * See https://github.com/hibernate/hibernate-jenkins-pipeline-helpers
*/ */
@Library('hibernate-jenkins-pipeline-helpers@1.5') _ @Library('hibernate-jenkins-pipeline-helpers@1.5') _
import org.hibernate.jenkins.pipeline.helpers.job.JobHelper
// Avoid running the pipeline on branch indexing // Avoid running the pipeline on branch indexing
if (currentBuild.getBuildCauses().toString().contains('BranchIndexingCause')) { if (currentBuild.getBuildCauses().toString().contains('BranchIndexingCause')) {
@ -11,8 +10,6 @@ if (currentBuild.getBuildCauses().toString().contains('BranchIndexingCause')) {
return return
} }
this.helper = new JobHelper(this)
pipeline { pipeline {
agent { agent {
label 'Fedora' label 'Fedora'
@ -23,6 +20,7 @@ pipeline {
options { options {
rateLimitBuilds(throttle: [count: 1, durationName: 'hour', userBoost: true]) rateLimitBuilds(throttle: [count: 1, durationName: 'hour', userBoost: true])
buildDiscarder(logRotator(numToKeepStr: '3', artifactNumToKeepStr: '3')) buildDiscarder(logRotator(numToKeepStr: '3', artifactNumToKeepStr: '3'))
configFileProvider([configFile(fileId: 'job-configuration.yaml', variable: 'JOB_CONFIGURATION_FILE')])
} }
triggers { triggers {
cron 'H * * * *' cron 'H * * * *'
@ -57,7 +55,7 @@ pipeline {
} }
post { post {
always { always {
notifyBuildResult notifyBuildResult maintainers: (String) readYaml(file: $JOB_CONFIGURATION_FILE).notification?.email?.recipients
} }
} }
} }