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