From 21a4bfbaffae021429b67314662cb241cde8f8be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Mon, 14 Oct 2019 19:27:47 +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..bcb4bb0 --- /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 == 'combo-plugin-nanterre' && env.GIT_BRANCH == 'origin/master') { + sh 'sudo -H -u eobuilder /usr/local/bin/eobuilder -d stretch combo-plugin-nanterre' + } else if (env.GIT_BRANCH.startsWith('hotfix/')) { + sh "sudo -H -u eobuilder /usr/local/bin/eobuilder -d stretch --branch ${env.GIT_BRANCH} --hotfix combo-plugin-nanterre" + } + } + } + } + } + post { + always { + script { + utils = new Utils() + utils.mail_notify(currentBuild, env, 'ci+jenkins-combo-plugin-nanterre@entrouvert.org') + } + } + success { + cleanWs() + } + } +}