Merge pull request #27 from kemitix/jenkins

jenkins: update to latest template
This commit is contained in:
Paul Campbell 2018-03-04 19:35:25 +00:00 committed by GitHub
commit 4c1e1d6082
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,5 @@
final String gitRepoUrl = 'git@github.com:kemitix/mon.git' final String repoName = "mon"
final String repoUrl = "git@github.com:kemitix/${repoName}.git"
final String mvn = "mvn --batch-mode --update-snapshots" final String mvn = "mvn --batch-mode --update-snapshots"
pipeline { pipeline {
@ -6,7 +7,7 @@ pipeline {
stages { stages {
stage('Prepare') { stage('Prepare') {
steps { steps {
git url: gitRepoUrl, branch: '**', credentialsId: 'github-kemitix' git url: repoUrl, branch: '**', credentialsId: 'github-kemitix'
} }
} }
stage('no SNAPSHOT in master') { stage('no SNAPSHOT in master') {
@ -57,7 +58,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"
} }
} }