mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-22 15:25:49 +00:00
Added email notifaction
This commit is contained in:
parent
819aa7a7ae
commit
41f0d67752
1 changed files with 12 additions and 1 deletions
13
Jenkinsfile
vendored
13
Jenkinsfile
vendored
|
@ -1,3 +1,7 @@
|
||||||
|
def targetMail = "bnagaraju96756@gmail.com,jenkinsautomationuser@gmail.com"
|
||||||
|
def emailDevOps(targetMail, msg) {
|
||||||
|
emailext body: "${msg}\nplease look into the build: ${BUILD_URL}", subject: "${currentBuild.result}: ${BUILD_TAG}", to: "${targetMail}"
|
||||||
|
}
|
||||||
pipeline {
|
pipeline {
|
||||||
agent {label "slave"}
|
agent {label "slave"}
|
||||||
stages {
|
stages {
|
||||||
|
@ -6,7 +10,7 @@ stages {
|
||||||
sh "pwd"
|
sh "pwd"
|
||||||
sh "ls -lrtha"
|
sh "ls -lrtha"
|
||||||
dir("spring-petclinic") {
|
dir("spring-petclinic") {
|
||||||
sh "./mvnw package"
|
sh "./mvnw clean package"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,4 +26,11 @@ stages {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
post {
|
||||||
|
always{
|
||||||
|
deleteDir()
|
||||||
|
emailDevOps(targetMail, "This is the mail notification.")
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue