mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-22 15:25:49 +00:00
go back
This commit is contained in:
parent
c0a61ef1b1
commit
a9b01c3c51
1 changed files with 42 additions and 7 deletions
49
Jenkinsfile
vendored
49
Jenkinsfile
vendored
|
@ -1,10 +1,45 @@
|
||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
stages {
|
tools {
|
||||||
stage('Build') {
|
maven 'Maven-3.6.3'
|
||||||
steps {
|
}
|
||||||
sh './mvnw package'
|
stages {
|
||||||
|
stage('Build') {
|
||||||
|
steps {
|
||||||
|
sh 'mvn clean'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Test') {
|
||||||
|
steps {
|
||||||
|
sh 'mvn test'
|
||||||
|
}
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
junit 'target/surefire-reports/*.xml'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Package') {
|
||||||
|
steps {
|
||||||
|
sh 'mvn package'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Deploy') {
|
||||||
|
steps {
|
||||||
|
echo 'Deploying'
|
||||||
|
}
|
||||||
|
post {
|
||||||
|
success {
|
||||||
|
mail to: 'sean.how0@gmail.com',
|
||||||
|
subject: "Build Successful: ${currentBuild.fullDisplayName}",
|
||||||
|
body: "Successfully built ${env.BUILD_URL}"
|
||||||
|
}
|
||||||
|
failure {
|
||||||
|
mail to: 'sean.how0@gmail.com',
|
||||||
|
subject: "Failed Pipeline: ${currentBuild.fullDisplayName}",
|
||||||
|
body: "Something is wrong with ${env.BUILD_URL}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in a new issue