64 lines
2.7 KiB
Groovy
64 lines
2.7 KiB
Groovy
@Library('eo-jenkins-lib@master') import eo.Utils
|
|
|
|
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', 'htmlcov-coverage-django18-authentic', 'Coverage authentic tests')
|
|
utils.publish_coverage_native(
|
|
'index.html', 'htmlcov-coverage-django18-hobo', 'Coverage hobo tests')
|
|
utils.publish_coverage_native(
|
|
'index.html', 'htmlcov-coverage-django18-authentic', 'Coverage multipublik tests')
|
|
utils.publish_coverage_native(
|
|
'index.html', 'htmlcov-coverage-django18-authentic', 'Coverage multitenant tests')
|
|
utils.publish_coverage_native(
|
|
'index.html', 'htmlcov-coverage-django18-authentic', 'Coverage passerelle tests')
|
|
utils.publish_coverage_native(
|
|
'index.html', 'htmlcov-coverage-django111-authentic', 'Coverage authentic tests')
|
|
utils.publish_coverage_native(
|
|
'index.html', 'htmlcov-coverage-django111-hobo', 'Coverage hobo tests')
|
|
utils.publish_coverage_native(
|
|
'index.html', 'htmlcov-coverage-django111-authentic', 'Coverage multipublik tests')
|
|
utils.publish_coverage_native(
|
|
'index.html', 'htmlcov-coverage-django111-authentic', 'Coverage multitenant tests')
|
|
utils.publish_coverage_native(
|
|
'index.html', 'htmlcov-coverage-django111-authentic', 'Coverage passerelle tests')
|
|
utils.publish_pylint('pylint.out')
|
|
}
|
|
junit 'junit-*.xml'
|
|
}
|
|
}
|
|
}
|
|
stage('Packaging') {
|
|
steps {
|
|
script {
|
|
if (env.JOB_NAME == 'hobo' && env.GIT_BRANCH == 'origin/master') {
|
|
sh 'sudo -H -u eobuilder /usr/local/bin/eobuilder hobo'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
post {
|
|
always {
|
|
script {
|
|
utils = new Utils()
|
|
utils.mail_notify(currentBuild, env, 'admin+jenkins-hobo@entrouvert.com')
|
|
}
|
|
}
|
|
success {
|
|
cleanWs()
|
|
}
|
|
}
|
|
}
|