This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
2019-10-16 08:06:34 +02:00
|
|
|
@Library('eo-jenkins-lib@master') import eo.Utils
|
|
|
|
|
|
|
|
pipeline {
|
|
|
|
agent any
|
2020-04-01 18:22:42 +02:00
|
|
|
options {
|
|
|
|
disableConcurrentBuilds()
|
|
|
|
}
|
2019-10-16 08:06:34 +02:00
|
|
|
stages {
|
2020-04-01 18:22:42 +02:00
|
|
|
stage('Unit Tests') {
|
|
|
|
steps {
|
|
|
|
sh 'tox -rv'
|
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
|
|
|
mergeJunitResults()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-10-16 08:06:34 +02:00
|
|
|
stage('Packaging') {
|
|
|
|
steps {
|
|
|
|
script {
|
|
|
|
if (env.JOB_NAME == 'passerelle-reunion-unicite' && env.GIT_BRANCH == 'origin/master') {
|
|
|
|
sh 'sudo -H -u eobuilder /usr/local/bin/eobuilder -d stretch passerelle-reunion-unicite'
|
|
|
|
} else if (env.GIT_BRANCH.startsWith('hotfix/')) {
|
|
|
|
sh "sudo -H -u eobuilder /usr/local/bin/eobuilder -d stretch --branch ${env.GIT_BRANCH} --hotfix passerelle-reunion-unicite"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
|
|
|
script {
|
|
|
|
utils = new Utils()
|
|
|
|
utils.mail_notify(currentBuild, env, 'ci+jenkins-passerelle-reunion-unicite@entrouvert.org')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
success {
|
|
|
|
cleanWs()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|