jenkins: run tests in parallel (#41236)

This commit is contained in:
Emmanuel Cazenave 2020-04-02 05:55:40 +02:00 committed by Frédéric Péters
parent 6e5da92f76
commit 94c031e1a6
1 changed files with 32 additions and 8 deletions

40
Jenkinsfile vendored
View File

@ -5,22 +5,46 @@ pipeline {
options { disableConcurrentBuilds() }
stages {
stage('Unit Tests') {
steps {
sh 'tox -rv'
parallel {
stage('Unit tests django 1.11') {
agent any
steps {
sh 'tox -rv -e py3-django111-pylint-coverage'
}
post {
always {
stash includes:'junit-py3-django111-pylint-coverage.xml', name: 'django111'
script {
utils = new Utils()
utils.publish_coverage('coverage.xml')
utils.publish_coverage_native('index.html')
utils.publish_pylint('pylint.out')
}
}
}
}
stage('Unit tests django 2.2') {
agent any
steps {
sh 'tox -rv -e py3-django22'
}
post {
always {
stash includes:'junit-py3-django22.xml', name: 'django22'
}
}
}
}
post {
always {
script {
utils = new Utils()
utils.publish_coverage('coverage.xml')
utils.publish_coverage_native('index.html')
utils.publish_pylint('pylint.out')
}
unstash 'django111'
unstash 'django22'
mergeJunitResults()
}
}
}
stage('Packaging') {
agent any
steps {
script {
if (env.JOB_NAME == 'wcs' && env.GIT_BRANCH == 'origin/master') {