mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-22 15:25:49 +00:00
modified jenkins file
This commit is contained in:
parent
9228d4b05d
commit
5873eb7011
1 changed files with 27 additions and 2 deletions
25
Jenkinsfile
vendored
25
Jenkinsfile
vendored
|
@ -1,10 +1,35 @@
|
||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
|
tools {
|
||||||
|
maven 'maven 3.6.3'
|
||||||
|
jdk 'jdk-1.8'
|
||||||
|
}
|
||||||
stages {
|
stages {
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
|
steps {
|
||||||
|
sh './mvnw clean compile'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Test') {
|
||||||
|
steps {
|
||||||
|
sh './mvnw test'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Package') {
|
||||||
steps {
|
steps {
|
||||||
sh './mvnw package'
|
sh './mvnw package'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stage('Deploy') {
|
||||||
|
/* only deploy when branch is master */
|
||||||
|
when {
|
||||||
|
branch 'master'
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
sh './mvnw deploy'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue