30 lines
975 B
Groovy
30 lines
975 B
Groovy
@Library('eo-jenkins-lib@main') import eo.Utils
|
|
|
|
pipeline {
|
|
agent any
|
|
stages {
|
|
stage('Packaging') {
|
|
steps {
|
|
script {
|
|
if (env.JOB_NAME == 'publik-imio-industrialisation' && env.GIT_BRANCH == 'origin/main') {
|
|
sh 'sudo -H -u eobuilder /usr/local/bin/eobuilder -d buster,bullseye publik-imio-industrialisation'
|
|
} 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-imio-industrialisation"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
post {
|
|
always {
|
|
script {
|
|
utils = new Utils()
|
|
utils.mail_notify(currentBuild, env, 'ci+jenkins-publik-imio-industrialisation@entrouvert.org')
|
|
}
|
|
}
|
|
success {
|
|
cleanWs()
|
|
}
|
|
}
|
|
}
|