[jenkins] Update to use verify and release profiles

Simplifies the command lines needed for each step
This commit is contained in:
Paul Campbell 2018-10-07 16:34:16 +01:00
parent fc3155c27b
commit 708f6ee3cf

View file

@ -8,7 +8,7 @@ pipeline {
stage('Build & Test') {
steps {
withMaven(maven: 'maven', jdk: 'JDK 1.8') {
sh "${mvn} clean compile checkstyle:checkstyle pmd:pmd test"
sh "${mvn} clean test"
// PMD to Jenkins
pmd canComputeNew: false, defaultEncoding: '', healthy: '', pattern: '', unHealthy: ''
}
@ -42,7 +42,7 @@ pipeline {
stage('Verify & Install') {
steps {
withMaven(maven: 'maven', jdk: 'JDK 1.8') {
sh "${mvn} -DskipTests install"
sh "${mvn} --activate-profiles verify install"
}
}
}
@ -74,7 +74,7 @@ pipeline {
when { expression { dependenciesSupportJDK >= 9 } }
steps {
withMaven(maven: 'maven', jdk: 'JDK 9') {
sh "${mvn} clean verify -Djava.version=9"
sh "${mvn} clean --activate-profiles verify verify -Djava.version=9"
}
}
}
@ -82,7 +82,7 @@ pipeline {
when { expression { dependenciesSupportJDK >= 10 } }
steps {
withMaven(maven: 'maven', jdk: 'JDK 10') {
sh "${mvn} clean verify -Djava.version=10"
sh "${mvn} clean --activate-profiles verify verify -Djava.version=10"
}
}
}