bidon/Jenkinsfile

45 lines
1.3 KiB
Groovy

@Library('eo-jenkins-lib@master') import eo.Utils
pipeline {
agent any
stages {
stage('unit test') {
steps {
sh 'echo $BUILD_TAG'
sh 'tox -r -- --reuse-db --junitxml=test_results.xml --cov-report xml --cov-report html --cov=bidon/ tests/'
}
}
parallel {
stage('packaging jessie') {
steps {
script {
if (env.BRANCH_NAME == 'master') {
sh 'sudo -H -u eobuilder /usr/local/bin/eobuilder -d jessie bidon'
}
}
}
}
stage('packaging stretch') {
steps{
script {
if (env.BRANCH_NAME == 'master') {
sh 'sudo -H -u eobuilder /usr/local/bin/eobuilder -d stretch bidon'
}
}
}
}
}
}
post {
always {
junit 'test_results.xml'
script {
utils = new Utils()
utils.publish_coverage('coverage.xml')
utils.publish_coverage_native('coverage.html')
utils.mail_notify(currentBuild, env, 'admin+jenkins-bidon@entrouvert.com')
}
}
}
}