56 lines
1.5 KiB
Groovy
56 lines
1.5 KiB
Groovy
@Library('eo-jenkins-lib@master') import eo.Utils
|
|
|
|
pipeline {
|
|
agent any
|
|
options {
|
|
disableConcurrentBuilds()
|
|
skipDefaultCheckout()
|
|
}
|
|
environment {
|
|
TMPDIR = "$WORKSPACE"
|
|
}
|
|
stages {
|
|
stage('Unit Tests') {
|
|
steps {
|
|
cleanWs()
|
|
dir ("repository") {
|
|
checkout scm
|
|
tox()
|
|
}
|
|
}
|
|
post {
|
|
always {
|
|
dir("repository") {
|
|
script {
|
|
utils = new Utils()
|
|
utils.publish_coverage('coverage.xml')
|
|
utils.publish_coverage_native('index.html')
|
|
utils.publish_pylint('pylint.out')
|
|
}
|
|
mergeJunitResults()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
stage('Packaging') {
|
|
steps {
|
|
script {
|
|
if (env.JOB_NAME == 'authentic2-auth-kerberos' && (!env.GIT_BRANCH || env.GIT_BRANCH != 'origin/master')) {
|
|
sh 'sudo -H -u eobuilder /usr/local/bin/eobuilder authentic2-auth-kerberos'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
post {
|
|
always {
|
|
dir("repository") {
|
|
script {
|
|
utils = new Utils()
|
|
utils.mail_notify(currentBuild, env, 'ci+jenkins-authentic2-auth-kerberos@entrouvert.org')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|