Update Jenkinsfile
This commit is contained in:
parent
78067c2c51
commit
e1b98f782e
|
@ -1,12 +1,14 @@
|
||||||
node {
|
node {
|
||||||
stage 'Git Clone'
|
stage('Clone') {
|
||||||
checkout scm
|
checkout scm
|
||||||
stage 'Maven Compile'
|
}
|
||||||
if (env.BRANCH_NAME == 'master') {
|
|
||||||
sh 'mvn clean deploy -U'
|
stage('Build') {
|
||||||
} else {
|
def verb = env.BRANCH_NAME == 'master' ? 'deploy' : 'package'
|
||||||
sh 'mvn clean package -U'
|
sh "${tool 'M3'}/bin/mvn clean ${verb} -U"
|
||||||
}
|
}
|
||||||
stage 'Jenkins Archive'
|
|
||||||
step([$class: 'ArtifactArchiver', artifacts: 'target/*.jar', fingerprint: true])
|
stage('Archive') {
|
||||||
|
archive 'target/*.jar'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue