add Jenkinsfile

This commit is contained in:
Benjamin Dauvergne 2021-12-10 12:57:25 +01:00
parent 903709bcdb
commit c9d6ad05f1
1 changed files with 35 additions and 0 deletions

35
Jenkinsfile vendored Normal file
View File

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