summaryrefslogtreecommitdiffstats
path: root/Jenkinsfile
diff options
context:
space:
mode:
authorEmmanuel Cazenave <ecazenave@entrouvert.com>2019-05-20 12:07:12 (GMT)
committerEmmanuel Cazenave <ecazenave@entrouvert.com>2019-05-28 08:56:03 (GMT)
commit39f8f5d3bb2fa48dc9df2c578d5bcb3b4b09c15f (patch)
tree1334e37b75e44f3a541f2e0a9b2a94c8de967fec /Jenkinsfile
parentc124c1d1a3f7c7e7ae149e2368c262d5468cba05 (diff)
downloadwelco-39f8f5d3bb2fa48dc9df2c578d5bcb3b4b09c15f.zip
welco-39f8f5d3bb2fa48dc9df2c578d5bcb3b4b09c15f.tar.gz
welco-39f8f5d3bb2fa48dc9df2c578d5bcb3b4b09c15f.tar.bz2
jenkins: use a Jenkinsfile (#33259)
Diffstat (limited to 'Jenkinsfile')
-rw-r--r--Jenkinsfile44
1 files changed, 44 insertions, 0 deletions
diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644
index 0000000..ae34198
--- /dev/null
+++ b/Jenkinsfile
@@ -0,0 +1,44 @@
+@Library('eo-jenkins-lib@master') import eo.Utils
+
+pipeline {
+ agent any
+ options { disableConcurrentBuilds() }
+ stages {
+ stage('Unit Tests') {
+ steps {
+ sh 'tox -rv'
+ }
+ post {
+ always {
+ script {
+ utils = new Utils()
+ utils.publish_coverage('coverage.xml')
+ utils.publish_coverage_native('index.html')
+ utils.publish_pylint('pylint.out')
+ }
+ junit '*_results.xml'
+ }
+ }
+ }
+ stage('Packaging') {
+ steps {
+ script {
+ if (env.JOB_NAME == 'welco' && env.GIT_BRANCH == 'origin/master') {
+ sh 'sudo -H -u eobuilder /usr/local/bin/eobuilder welco'
+ }
+ }
+ }
+ }
+ }
+ post {
+ always {
+ script {
+ utils = new Utils()
+ utils.mail_notify(currentBuild, env, 'admin+jenkins-welco@entrouvert.com')
+ }
+ }
+ success {
+ cleanWs()
+ }
+ }
+}