added email notification steps

This commit is contained in:
abhishek 2023-11-01 12:52:11 +05:30
parent c4b07711a2
commit 91201a4b58

15
Jenkinsfile vendored
View file

@ -18,8 +18,21 @@ pipeline{
withSonarQubeEnv('SONAR_CLOUD'){
sh 'mvn clean verify sonar:sonar -Dsonar.organization=springgit -Dsonar.projectKey=springgit'
}
}
}
}
post{
success{
mail subject : 'Jenkins job of ${JOB_NAME} of build numer ${BUILD_ID} is passed',
body : 'Click Here to see more details ${BUILD_URL}',
from : 'jenkins@outlook.com'
to : 'abhishek16tiwary@gmail.com'
}
failure{
mail subject : 'Jenkins job of ${JOB_NAME} of build numer ${BUILD_ID} is Failed',
body : 'Click Here to see more details ${BUILD_URL}',
from : 'jenkins@outlook.com'
to : 'abhishek16tiwary@gmail.com'
}
}
}