Update Jenkinsfile

This commit is contained in:
Colin McDonald 2017-09-01 12:13:25 -04:00 committed by GitHub
parent 78067c2c51
commit e1b98f782e
1 changed files with 12 additions and 10 deletions

22
Jenkinsfile vendored
View File

@ -1,12 +1,14 @@
node {
stage 'Git Clone'
checkout scm
stage 'Maven Compile'
if (env.BRANCH_NAME == 'master') {
sh 'mvn clean deploy -U'
} else {
sh 'mvn clean package -U'
}
stage 'Jenkins Archive'
step([$class: 'ArtifactArchiver', artifacts: 'target/*.jar', fingerprint: true])
stage('Clone') {
checkout scm
}
stage('Build') {
def verb = env.BRANCH_NAME == 'master' ? 'deploy' : 'package'
sh "${tool 'M3'}/bin/mvn clean ${verb} -U"
}
stage('Archive') {
archive 'target/*.jar'
}
}