This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
auquotidien/Jenkinsfile

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

47 lines
1.4 KiB
Plaintext
Raw Permalink Normal View History

2020-12-26 15:22:15 +01:00
@Library('eo-jenkins-lib@main') import eo.Utils
2019-09-23 14:08:12 +02:00
pipeline {
agent any
options { disableConcurrentBuilds() }
stages {
stage('Unit Tests') {
steps {
sh './jenkins.sh'
}
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 {
2020-12-26 15:22:15 +01:00
if (env.JOB_NAME == 'auquotidien' && env.GIT_BRANCH == 'origin/main') {
2019-09-23 14:08:12 +02:00
sh 'sudo -H -u eobuilder /usr/local/bin/eobuilder auquotidien'
} else if (env.GIT_BRANCH.startsWith('hotfix/')) {
sh "sudo -H -u eobuilder /usr/local/bin/eobuilder --branch ${env.GIT_BRANCH} --hotfix auquotidien"
}
}
}
}
}
post {
always {
script {
utils = new Utils()
utils.mail_notify(currentBuild, env, 'ci+jenkins-auquotidien@entrouvert.org')
2019-09-23 14:08:12 +02:00
}
}
success {
cleanWs()
}
}
}