jenkins: build and deploy using Java 9

This commit is contained in:
Paul Campbell 2018-03-04 17:50:56 +00:00
parent 211297df9f
commit 5e28fbb65d

View file

@ -23,20 +23,9 @@ pipeline {
} }
} }
stage('Build') { stage('Build') {
parallel { steps {
stage('Java 8') { withMaven(maven: 'maven 3.5.2', jdk: 'JDK 9') {
steps { sh 'mvn clean install'
withMaven(maven: 'maven 3.5.2', jdk: 'JDK 1.8') {
sh "${mvn} clean install"
}
}
}
stage('Java 9') {
steps {
withMaven(maven: 'maven 3.5.2', jdk: 'JDK 9') {
sh 'mvn clean install'
}
}
} }
} }
} }
@ -48,7 +37,7 @@ pipeline {
stage('Deploy') { stage('Deploy') {
when { expression { (env.GIT_BRANCH == 'master') } } when { expression { (env.GIT_BRANCH == 'master') } }
steps { steps {
withMaven(maven: 'maven 3.5.2', jdk: 'JDK 1.8') { withMaven(maven: 'maven 3.5.2', jdk: 'JDK 9') {
sh "${mvn} deploy --activate-profiles release -DskipTests=true" sh "${mvn} deploy --activate-profiles release -DskipTests=true"
} }
} }