authentic/Jenkinsfile

53 lines
1.6 KiB
Groovy

@Library('eo-jenkins-lib@master') import eo.Utils
pipeline {
agent any
options { disableConcurrentBuilds() }
environment {
TMPDIR = "/tmp/$BUILD_TAG"
}
stages {
stage('Unit Tests') {
steps {
sh "mkdir ${env.TMPDIR}"
sh './jenkins.sh'
}
post {
always {
script {
utils = new Utils()
utils.publish_coverage('coverage-*.xml')
utils.publish_coverage_native(
'index.html', 'htmlcov-coverage-dj18-authentic-pg', 'Coverage a2')
utils.publish_coverage_native(
'index.html', 'htmlcov-coverage-dj18-rbac-pg', , 'Coverage rbac')
utils.publish_pylint('pylint.out')
}
junit 'junit-*.xml'
}
}
}
stage('Packaging') {
steps {
script {
if (env.JOB_NAME == 'authentic' && env.GIT_BRANCH == 'origin/master') {
sh 'sudo -H -u eobuilder /usr/local/bin/eobuilder authentic'
}
}
}
}
}
post {
always {
script {
utils = new Utils()
utils.mail_notify(currentBuild, env, 'admin+jenkins-authentic@entrouvert.com')
}
}
cleanup {
sh "rm -rf ${env.TMPDIR}"
cleanWs()
}
}
}