build: add Jenkinsfile for CI

This commit is contained in:
Frédéric Péters 2021-06-01 11:22:22 +02:00
parent 39153b2877
commit 9270265662
1 changed files with 32 additions and 0 deletions

32
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,32 @@
@Library('eo-jenkins-lib@main') import eo.Utils
pipeline {
agent any
options {
disableConcurrentBuilds()
}
stages {
stage('Packaging') {
steps {
script {
if (env.JOB_NAME == 'pfwb-archives-proxy' && env.GIT_BRANCH == 'origin/main') {
sh 'sudo -H -u eobuilder /usr/local/bin/eobuilder pfwb-archives-proxy'
} else if (env.GIT_BRANCH.startsWith('hotfix/')) {
sh "sudo -H -u eobuilder /usr/local/bin/eobuilder --branch ${env.GIT_BRANCH} --hotfix pfwb-archives-proxy"
}
}
}
}
}
post {
always {
script {
utils = new Utils()
utils.mail_notify(currentBuild, env, 'ci+jenkins-pfwb-archives-proxy@entrouvert.org')
}
}
success {
cleanWs()
}
}
}