jenkins: build and deploy using Java 9
This commit is contained in:
parent
211297df9f
commit
5e28fbb65d
1 changed files with 4 additions and 15 deletions
|
@ -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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue