2018-10-09 18:13:19 +02:00
|
|
|
@Library('eo-jenkins-lib@master') import eo.Utils
|
|
|
|
|
|
|
|
pipeline {
|
|
|
|
agent any
|
2019-05-10 12:31:20 +02:00
|
|
|
options { disableConcurrentBuilds() }
|
2018-10-09 18:13:19 +02:00
|
|
|
stages {
|
2019-11-12 14:20:07 +01:00
|
|
|
stage('Unit Tests (Python 2)') {
|
|
|
|
steps {
|
|
|
|
sh 'tox -r -e py2'
|
|
|
|
}
|
|
|
|
}
|
2018-10-09 18:13:19 +02:00
|
|
|
stage('Unit Tests') {
|
|
|
|
steps {
|
2019-11-12 17:03:53 +01:00
|
|
|
sh 'git clean -xdf'
|
2019-11-12 14:20:07 +01:00
|
|
|
sh 'tox -r -e py3-pylint-coverage'
|
2018-10-09 18:13:19 +02:00
|
|
|
}
|
2018-12-24 10:59:16 +01:00
|
|
|
post {
|
|
|
|
always {
|
|
|
|
script {
|
|
|
|
utils = new Utils()
|
|
|
|
utils.publish_coverage('coverage.xml')
|
|
|
|
utils.publish_coverage_native('index.html')
|
|
|
|
utils.publish_pylint('pylint.out')
|
|
|
|
}
|
|
|
|
junit '*_results.xml'
|
|
|
|
}
|
|
|
|
}
|
2018-10-09 18:13:19 +02:00
|
|
|
}
|
|
|
|
stage('Packaging') {
|
|
|
|
steps {
|
|
|
|
script {
|
|
|
|
if (env.JOB_NAME == 'wcs' && env.GIT_BRANCH == 'origin/master') {
|
|
|
|
sh 'sudo -H -u eobuilder /usr/local/bin/eobuilder wcs'
|
2019-01-13 11:04:03 +01:00
|
|
|
} else if (env.GIT_BRANCH.startsWith('hotfix/')) {
|
|
|
|
sh "sudo -H -u eobuilder /usr/local/bin/eobuilder --branch ${env.GIT_BRANCH} --hotfix wcs"
|
2018-10-09 18:13:19 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
|
|
|
script {
|
|
|
|
utils = new Utils()
|
2019-11-12 16:18:07 +01:00
|
|
|
utils.mail_notify(currentBuild, env, 'fpeters+jenkins-wcs@entrouvert.org')
|
2018-10-09 18:13:19 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
success {
|
|
|
|
cleanWs()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|