2020-12-26 15:21:15 +01:00
|
|
|
@Library('eo-jenkins-lib@main') import eo.Utils
|
2018-06-01 10:16:24 +02:00
|
|
|
|
|
|
|
pipeline {
|
|
|
|
agent any
|
2019-12-18 13:54:02 +01:00
|
|
|
options {
|
|
|
|
disableConcurrentBuilds()
|
2020-06-15 17:31:13 +02:00
|
|
|
timeout(time: 20, unit: 'MINUTES')
|
2019-12-18 13:54:02 +01:00
|
|
|
}
|
2018-06-01 10:16:24 +02:00
|
|
|
stages {
|
|
|
|
stage('Unit Tests') {
|
|
|
|
steps {
|
2022-07-06 17:02:23 +02:00
|
|
|
sh 'NUMPROCESSES=6 tox -rv'
|
2018-06-01 10:16:24 +02:00
|
|
|
}
|
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 {
|
2020-12-26 15:21:15 +01:00
|
|
|
if (env.JOB_NAME == 'combo' && env.GIT_BRANCH == 'origin/main') {
|
2021-12-03 15:25:22 +01:00
|
|
|
sh 'sudo -H -u eobuilder /usr/local/bin/eobuilder -d buster,bullseye combo'
|
2019-07-02 13:56:18 +02:00
|
|
|
} else if (env.GIT_BRANCH.startsWith('hotfix/')) {
|
2021-12-03 15:25:22 +01:00
|
|
|
sh "sudo -H -u eobuilder /usr/local/bin/eobuilder -d buster,bullseye --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()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|