diff --git a/Jenkinsfile b/Jenkinsfile index 961d35c44..69acc55a1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,9 +17,22 @@ pipeline{ steps{ 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' + } + } } \ No newline at end of file