From d8825ac4c89b7a6c20a9e6880905e824abc47a25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Mon, 23 Sep 2019 15:13:50 +0200 Subject: [PATCH] add Jenkinsfile --- Jenkinsfile | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..1e477dd --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,29 @@ +@Library('eo-jenkins-lib@master') import eo.Utils + +pipeline { + agent any + stages { + stage('Packaging') { + steps { + script { + if (env.JOB_NAME == 'authentic2-gnm' && env.GIT_BRANCH == 'origin/master') { + sh 'sudo -H -u eobuilder /usr/local/bin/eobuilder -d stretch authentic2-gnm' + } else if (env.GIT_BRANCH.startsWith('hotfix/')) { + sh "sudo -H -u eobuilder /usr/local/bin/eobuilder -d stretch --branch ${env.GIT_BRANCH} --hotfix authentic2-gnm" + } + } + } + } + } + post { + always { + script { + utils = new Utils() + utils.mail_notify(currentBuild, env, 'admin+jenkins-authentic2-gnm@entrouvert.com') + } + } + success { + cleanWs() + } + } +}