34 lines
964 B
Groovy
34 lines
964 B
Groovy
@Library('eo-jenkins-lib@wip/mail-notify') import eo.Utils
|
|
|
|
pipeline {
|
|
agent any
|
|
stages {
|
|
stage('unit test') {
|
|
steps {
|
|
sh 'tox -r -- --junitxml=test_results.xml --cov-report xml --cov-report html --cov=bidon/ tests/'
|
|
}
|
|
}
|
|
stage('packaging') {
|
|
steps {
|
|
script {
|
|
if (env.BRANCH_NAME == 'master') {
|
|
sh 'sudo -H -u eobuilder /usr/local/bin/eobuilder -d jessie bidon'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
post {
|
|
always {
|
|
sh 'printenv'
|
|
script {
|
|
utils = new Utils()
|
|
utils.mail_notify(currentBuild, env, 'admin+jenkins-bidon@entrouvert.com')
|
|
utils.publish_coverage('coverage.xml')
|
|
utils.publish_coverage_native('coverage.html')
|
|
}
|
|
junit 'test_results.xml'
|
|
}
|
|
}
|
|
}
|