added email notification steps

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

17
Jenkinsfile vendored
View file

@ -17,9 +17,22 @@ pipeline{
steps{ steps{
withSonarQubeEnv('SONAR_CLOUD'){ withSonarQubeEnv('SONAR_CLOUD'){
sh 'mvn clean verify sonar:sonar -Dsonar.organization=springgit -Dsonar.projectKey=springgit' 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'
}
}
} }