From 94c031e1a68f3e8291580f53793e689eae090661 Mon Sep 17 00:00:00 2001 From: Emmanuel Cazenave Date: Thu, 2 Apr 2020 05:55:40 +0200 Subject: [PATCH] jenkins: run tests in parallel (#41236) --- Jenkinsfile | 40 ++++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 9882f1203..977e3f91b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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') {