2018-06-01 10:16:24 +02:00
|
|
|
@Library('eo-jenkins-lib@master') import eo.Utils
|
|
|
|
|
|
|
|
pipeline {
|
|
|
|
agent any
|
2019-12-18 13:54:02 +01:00
|
|
|
options {
|
|
|
|
disableConcurrentBuilds()
|
|
|
|
timeout(time: 10, unit: 'MINUTES')
|
|
|
|
}
|
2018-06-01 10:16:24 +02:00
|
|
|
stages {
|
|
|
|
stage('Unit Tests') {
|
|
|
|
steps {
|
|
|
|
sh 'tox -rv'
|
|
|
|
}
|
2019-01-02 16:28:12 +01:00
|
|
|
post {
|
|
|
|
always {
|
|
|
|
script {
|
|
|
|
utils = new Utils()
|
|
|
|
utils.publish_coverage('coverage.xml')
|
|
|
|
utils.publish_coverage_native('index.html')
|
|
|
|
utils.publish_pylint('pylint.out')
|
|
|
|
}
|
2019-12-09 15:31:07 +01:00
|
|
|
mergeJunitResults()
|
2019-01-02 16:28:12 +01:00
|
|
|
}
|
|
|
|
}
|
2018-06-01 10:16:24 +02:00
|
|
|
}
|
|
|
|
stage('Packaging') {
|
|
|
|
steps {
|
|
|
|
script {
|
2018-06-01 10:40:10 +02:00
|
|
|
if (env.JOB_NAME == 'combo' && env.GIT_BRANCH == 'origin/master') {
|
2020-04-24 15:42:53 +02:00
|
|
|
sh 'sudo -H -u eobuilder /usr/local/bin/eobuilder combo'
|
2019-07-02 13:56:18 +02:00
|
|
|
} else if (env.GIT_BRANCH.startsWith('hotfix/')) {
|
2020-04-24 15:42:53 +02:00
|
|
|
sh "sudo -H -u eobuilder /usr/local/bin/eobuilder --branch ${env.GIT_BRANCH} --hotfix combo"
|
2018-06-01 10:16:24 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
|
|
|
script {
|
|
|
|
utils = new Utils()
|
2019-10-02 13:43:01 +02:00
|
|
|
utils.mail_notify(currentBuild, env, 'ci+jenkins-combo@entrouvert.org')
|
2018-06-01 10:16:24 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
success {
|
|
|
|
cleanWs()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|