jenkins: explicitly use JDK 1.8

This commit is contained in:
Paul Campbell 2018-07-03 10:52:00 +01:00
parent 8c3163d555
commit c47d934da4

View file

@ -18,7 +18,7 @@ pipeline {
} }
stage('Build & Test') { stage('Build & Test') {
steps { steps {
withMaven(maven: 'maven', jdk: 'JDK LTS') { withMaven(maven: 'maven', jdk: 'JDK 1.8') {
sh "${mvn} clean compile checkstyle:checkstyle pmd:pmd test" sh "${mvn} clean compile checkstyle:checkstyle pmd:pmd test"
jacoco exclusionPattern: '**/*{Test|IT|Main|Application|Immutable}.class' jacoco exclusionPattern: '**/*{Test|IT|Main|Application|Immutable}.class'
pmd canComputeNew: false, defaultEncoding: '', healthy: '', pattern: '', unHealthy: '' pmd canComputeNew: false, defaultEncoding: '', healthy: '', pattern: '', unHealthy: ''
@ -31,7 +31,7 @@ pipeline {
} }
stage('Verify & Install') { stage('Verify & Install') {
steps { steps {
withMaven(maven: 'maven', jdk: 'JDK LTS') { withMaven(maven: 'maven', jdk: 'JDK 1.8') {
sh "${mvn} -DskipTests install" sh "${mvn} -DskipTests install"
} }
} }
@ -40,7 +40,7 @@ pipeline {
when { expression { isPublished() } } when { expression { isPublished() } }
steps { steps {
withSonarQubeEnv('sonarqube') { withSonarQubeEnv('sonarqube') {
withMaven(maven: 'maven', jdk: 'JDK LTS') { withMaven(maven: 'maven', jdk: 'JDK 1.8') {
sh "${mvn} org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar" sh "${mvn} org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar"
} }
} }
@ -53,7 +53,7 @@ pipeline {
} }
} }
steps { steps {
withMaven(maven: 'maven', jdk: 'JDK LTS') { withMaven(maven: 'maven', jdk: 'JDK 1.8') {
sh "${mvn} deploy --activate-profiles release -DskipTests=true -Dpitest.skip=true" sh "${mvn} deploy --activate-profiles release -DskipTests=true -Dpitest.skip=true"
} }
} }