Merge pull request #124 from kemitix/update-jenkinsfile
[jenkins] Update to use profiles and remove Java 9 build step
This commit is contained in:
commit
3b3fcfe54b
1 changed files with 4 additions and 12 deletions
|
@ -1,6 +1,6 @@
|
||||||
final String publicRepo = 'https://github.com/kemitix/'
|
final String publicRepo = 'https://github.com/kemitix/'
|
||||||
final String mvn = "mvn --batch-mode --update-snapshots --errors"
|
final String mvn = "mvn --batch-mode --update-snapshots --errors"
|
||||||
final dependenciesSupportJDK=10
|
final dependenciesSupportJDK = 10
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
|
@ -8,7 +8,7 @@ pipeline {
|
||||||
stage('Build & Test') {
|
stage('Build & Test') {
|
||||||
steps {
|
steps {
|
||||||
withMaven(maven: 'maven', jdk: 'JDK 1.8') {
|
withMaven(maven: 'maven', jdk: 'JDK 1.8') {
|
||||||
sh "${mvn} clean compile checkstyle:checkstyle pmd:pmd test"
|
sh "${mvn} clean test"
|
||||||
// PMD to Jenkins
|
// PMD to Jenkins
|
||||||
pmd canComputeNew: false, defaultEncoding: '', healthy: '', pattern: '', unHealthy: ''
|
pmd canComputeNew: false, defaultEncoding: '', healthy: '', pattern: '', unHealthy: ''
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ pipeline {
|
||||||
stage('Verify & Install') {
|
stage('Verify & Install') {
|
||||||
steps {
|
steps {
|
||||||
withMaven(maven: 'maven', jdk: 'JDK 1.8') {
|
withMaven(maven: 'maven', jdk: 'JDK 1.8') {
|
||||||
sh "${mvn} -DskipTests install"
|
sh "${mvn} --activate-profiles verify install"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -70,19 +70,11 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Build Java 9') {
|
|
||||||
when { expression { dependenciesSupportJDK >= 9 } }
|
|
||||||
steps {
|
|
||||||
withMaven(maven: 'maven', jdk: 'JDK 9') {
|
|
||||||
sh "${mvn} clean verify -Djava.version=9"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage('Build Java 10') {
|
stage('Build Java 10') {
|
||||||
when { expression { dependenciesSupportJDK >= 10 } }
|
when { expression { dependenciesSupportJDK >= 10 } }
|
||||||
steps {
|
steps {
|
||||||
withMaven(maven: 'maven', jdk: 'JDK 10') {
|
withMaven(maven: 'maven', jdk: 'JDK 10') {
|
||||||
sh "${mvn} clean verify -Djava.version=10"
|
sh "${mvn} clean --activate-profiles verify verify -Djava.version=10"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue