jenkins: don't run builds in parallel
This commit is contained in:
parent
1cc7246d85
commit
ab2873d221
1 changed files with 12 additions and 15 deletions
|
@ -13,7 +13,8 @@ pipeline {
|
||||||
when {
|
when {
|
||||||
expression {
|
expression {
|
||||||
(env.GIT_BRANCH == 'master' || env.CHANGE_TARGET == 'master') &&
|
(env.GIT_BRANCH == 'master' || env.CHANGE_TARGET == 'master') &&
|
||||||
(readMavenPom(file: 'pom.xml').version).contains("SNAPSHOT") }
|
(readMavenPom(file: 'pom.xml').version).contains("SNAPSHOT")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
error("Build failed because SNAPSHOT version")
|
error("Build failed because SNAPSHOT version")
|
||||||
|
@ -28,24 +29,20 @@ pipeline {
|
||||||
pmd canComputeNew: false, defaultEncoding: '', healthy: '', pattern: '', unHealthy: ''
|
pmd canComputeNew: false, defaultEncoding: '', healthy: '', pattern: '', unHealthy: ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Build') {
|
stage('Build Java 8') {
|
||||||
parallel {
|
|
||||||
stage('Java 8') {
|
|
||||||
steps {
|
steps {
|
||||||
withMaven(maven: 'maven 3.5.2', jdk: 'JDK 1.8') {
|
withMaven(maven: 'maven 3.5.2', jdk: 'JDK 1.8') {
|
||||||
sh "${mvn} clean install"
|
sh "${mvn} clean install"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Java 9') {
|
stage('Build Java 9') {
|
||||||
steps {
|
steps {
|
||||||
withMaven(maven: 'maven 3.5.2', jdk: 'JDK 9') {
|
withMaven(maven: 'maven 3.5.2', jdk: 'JDK 9') {
|
||||||
sh "${mvn} clean install"
|
sh "${mvn} clean install"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
stage('Test Results') {
|
stage('Test Results') {
|
||||||
when { expression { findFiles(glob: '**/target/surefire-reports/*.xml').length > 0 } }
|
when { expression { findFiles(glob: '**/target/surefire-reports/*.xml').length > 0 } }
|
||||||
steps {
|
steps {
|
||||||
|
|
Loading…
Reference in a new issue