add Jenkinsfile

This commit is contained in:
Frédéric Péters 2019-09-23 15:13:50 +02:00
parent afd1d628e1
commit d8825ac4c8
1 changed files with 29 additions and 0 deletions

29
Jenkinsfile vendored Normal file
View File

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