jenkins: run tests in parallel (#41236)
This commit is contained in:
parent
6e5da92f76
commit
94c031e1a6
|
@ -5,22 +5,46 @@ pipeline {
|
||||||
options { disableConcurrentBuilds() }
|
options { disableConcurrentBuilds() }
|
||||||
stages {
|
stages {
|
||||||
stage('Unit Tests') {
|
stage('Unit Tests') {
|
||||||
steps {
|
parallel {
|
||||||
sh 'tox -rv'
|
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 {
|
post {
|
||||||
always {
|
always {
|
||||||
script {
|
unstash 'django111'
|
||||||
utils = new Utils()
|
unstash 'django22'
|
||||||
utils.publish_coverage('coverage.xml')
|
|
||||||
utils.publish_coverage_native('index.html')
|
|
||||||
utils.publish_pylint('pylint.out')
|
|
||||||
}
|
|
||||||
mergeJunitResults()
|
mergeJunitResults()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Packaging') {
|
stage('Packaging') {
|
||||||
|
agent any
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
if (env.JOB_NAME == 'wcs' && env.GIT_BRANCH == 'origin/master') {
|
if (env.JOB_NAME == 'wcs' && env.GIT_BRANCH == 'origin/master') {
|
||||||
|
|
Loading…
Reference in New Issue