authentic2-auth-fedict/Jenkinsfile

30 lines
913 B
Groovy

@Library('eo-jenkins-lib@master') import eo.Utils
pipeline {
agent any
stages {
stage('Packaging') {
steps {
script {
if (env.JOB_NAME == 'authentic2-auth-fedict' && env.GIT_BRANCH == 'origin/master') {
sh 'sudo -H -u eobuilder /usr/local/bin/eobuilder authentic2-auth-fedict'
} else if (env.GIT_BRANCH.startsWith('hotfix/')) {
sh "sudo -H -u eobuilder /usr/local/bin/eobuilder --branch ${env.GIT_BRANCH} --hotfix authentic2-auth-fedict"
}
}
}
}
}
post {
always {
script {
utils = new Utils()
utils.mail_notify(currentBuild, env, 'ci+jenkins-authentic2-auth-fedict@entrouvert.org')
}
}
success {
cleanWs()
}
}
}