update Jenkinsfile

This commit is contained in:
Emmanuel Cazenave 2020-04-02 11:07:57 +02:00
parent 9bd810e3f5
commit b45af73da5
1 changed files with 6 additions and 4 deletions

10
Jenkinsfile vendored
View File

@ -1,4 +1,4 @@
@Library('eo-jenkins-lib@wip/mail-notify') import eo.Utils
@Library('eo-jenkins-lib@master') import eo.Utils
pipeline {
agent any
@ -8,11 +8,13 @@ pipeline {
sh 'tox -r -- --junitxml=test_results.xml --cov-report xml --cov-report html --cov=bidon/ tests/'
}
}
stage('packaging') {
stage('Packaging') {
steps {
script {
if (env.BRANCH_NAME == 'master') {
sh 'sudo -H -u eobuilder /usr/local/bin/eobuilder -d jessie bidon'
if (env.JOB_NAME == 'bidon' && env.GIT_BRANCH == 'origin/master') {
sh 'sudo -H -u eobuilder /usr/local/bin/eobuilder bidon'
} else if (env.GIT_BRANCH.startsWith('hotfix/')) {
sh "sudo -H -u eobuilder /usr/local/bin/eobuilder -d stretch --branch ${env.GIT_BRANCH} --hotfix bidon"
}
}
}