38 lines
1.0 KiB
Groovy
38 lines
1.0 KiB
Groovy
@Library('eo-jenkins-lib@master') import eo.Utils
|
|
|
|
pipeline {
|
|
agent any
|
|
stages {
|
|
stage('Unit Tests') {
|
|
steps {
|
|
echo "Job name : ${env.JOB_NAME}"
|
|
sh 'tox -rv'
|
|
}
|
|
}
|
|
stage('Packaging') {
|
|
steps {
|
|
script {
|
|
if (env.BRANCH_NAME == 'master' && env.JOB_NAME == 'combo') {
|
|
sh 'sudo -H -u eobuilder /usr/local/bin/eobuilder -d jessie,stretch combo'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
post {
|
|
always {
|
|
junit '*_results.xml'
|
|
script {
|
|
utils = new Utils()
|
|
utils.publish_coverage('coverage.xml')
|
|
utils.publish_coverage_native('index.html')
|
|
utils.publish_pylint('pylint.out')
|
|
utils.mail_notify(currentBuild, env, 'admin+jenkins-combo@entrouvert.com')
|
|
}
|
|
}
|
|
success {
|
|
cleanWs()
|
|
}
|
|
}
|
|
}
|