45 lines
1.2 KiB
Plaintext
45 lines
1.2 KiB
Plaintext
|
@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 == 'publik-django-templatetags' && env.GIT_BRANCH == 'origin/main') {
|
||
|
sh 'sudo -H -u eobuilder /usr/local/bin/eobuilder -d buster,bullseye publik-django-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 publik-django-templatetags"
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
post {
|
||
|
always {
|
||
|
script {
|
||
|
utils = new Utils()
|
||
|
utils.mail_notify(currentBuild, env, 'ci+jenkins-publik-django-templatetags@entrouvert.org')
|
||
|
}
|
||
|
}
|
||
|
success {
|
||
|
cleanWs()
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|