hobo/Jenkinsfile

54 lines
1.9 KiB
Plaintext
Raw Normal View History

2019-01-16 10:56:16 +01:00
@Library('eo-jenkins-lib@master') import eo.Utils
pipeline {
agent any
options { disableConcurrentBuilds() }
2019-01-16 10:56:16 +01:00
stages {
stage('Unit Tests') {
steps {
sh './jenkins.sh'
}
post {
always {
script {
utils = new Utils()
utils.publish_coverage('coverage-*.xml')
utils.publish_coverage_native(
2019-05-19 14:18:30 +02:00
'index.html', 'htmlcov-coverage-authentic', 'Coverage authentic tests')
2019-01-16 10:56:16 +01:00
utils.publish_coverage_native(
2019-05-19 14:18:30 +02:00
'index.html', 'htmlcov-coverage-hobo', 'Coverage hobo tests')
2019-01-16 10:56:16 +01:00
utils.publish_coverage_native(
2019-05-19 14:18:30 +02:00
'index.html', 'htmlcov-coverage-multipublik', 'Coverage multipublik tests')
2019-01-16 10:56:16 +01:00
utils.publish_coverage_native(
2019-05-19 14:18:30 +02:00
'index.html', 'htmlcov-coverage-multitenant', 'Coverage multitenant tests')
2019-01-16 10:56:16 +01:00
utils.publish_coverage_native(
2019-05-19 14:18:30 +02:00
'index.html', 'htmlcov-coverage-passerelle', 'Coverage passerelle tests')
2019-01-16 10:56:16 +01:00
utils.publish_pylint('pylint.out')
}
junit 'junit-*.xml'
}
}
}
stage('Packaging') {
steps {
script {
if (env.JOB_NAME == 'hobo' && env.GIT_BRANCH == 'origin/master') {
2019-05-19 14:18:30 +02:00
sh 'sudo -H -u eobuilder /usr/local/bin/eobuilder -d stretch hobo'
2019-01-16 10:56:16 +01:00
}
}
}
}
}
post {
always {
script {
utils = new Utils()
utils.mail_notify(currentBuild, env, 'admin+jenkins-hobo@entrouvert.com')
}
}
success {
cleanWs()
}
}
}