jenkins: don't run builds in parallel

This commit is contained in:
Paul Campbell 2018-03-09 19:34:24 +00:00
parent 1cc7246d85
commit ab2873d221

View file

@ -13,7 +13,8 @@ pipeline {
when {
expression {
(env.GIT_BRANCH == 'master' || env.CHANGE_TARGET == 'master') &&
(readMavenPom(file: 'pom.xml').version).contains("SNAPSHOT") }
(readMavenPom(file: 'pom.xml').version).contains("SNAPSHOT")
}
}
steps {
error("Build failed because SNAPSHOT version")
@ -28,24 +29,20 @@ pipeline {
pmd canComputeNew: false, defaultEncoding: '', healthy: '', pattern: '', unHealthy: ''
}
}
stage('Build') {
parallel {
stage('Java 8') {
stage('Build Java 8') {
steps {
withMaven(maven: 'maven 3.5.2', jdk: 'JDK 1.8') {
sh "${mvn} clean install"
}
}
}
stage('Java 9') {
stage('Build Java 9') {
steps {
withMaven(maven: 'maven 3.5.2', jdk: 'JDK 9') {
sh "${mvn} clean install"
}
}
}
}
}
stage('Test Results') {
when { expression { findFiles(glob: '**/target/surefire-reports/*.xml').length > 0 } }
steps {