add ci job

This commit is contained in:
Frédéric Péters 2022-04-02 14:17:07 +02:00
parent 061448ac98
commit 6570835fa5
1 changed files with 42 additions and 0 deletions

42
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,42 @@
@Library('eo-jenkins-lib@main') import eo.Utils
pipeline {
agent any
options {
disableConcurrentBuilds()
}
stages {
stage('Unit Tests') {
steps {
sh 'tox -rv'
}
post {
always {
mergeJunitResults()
}
}
}
stage('Packaging') {
steps {
script {
if (env.JOB_NAME == 'imio-teleservices-templatetags' && env.GIT_BRANCH == 'origin/main') {
sh 'sudo -H -u eobuilder /usr/local/bin/eobuilder -d buster,bullseye imio-teleservices-templatetags'
} else if (env.GIT_BRANCH.startsWith('hotfix/')) {
sh "sudo -H -u eobuilder /usr/local/bin/eobuilder -d buster,bullseye --branch ${env.GIT_BRANCH} --hotfix imio-teleservices-templatetags"
}
}
}
}
}
post {
always {
script {
utils = new Utils()
utils.mail_notify(currentBuild, env, 'ci+jenkins-imio-teleservices-templatetags@entrouvert.org')
}
}
success {
cleanWs()
}
}
}