Jenkins email configuration , send an email when the pipeline is successfule or failed using aws ses

Devops TerraByte
Devops TerraByte
363 بار بازدید - 9 ماه پیش - In the video we will
In the video we will create our own email server using the aws ses and then we will configure it credentials in the jenkins.

Pipeline Script used in the video :-
Chnage your email id in the below script

------------------------------------------------------------------------------------------------------------------------

pipeline {
   agent any
   
   stages {
       stage('List Directory') {
           steps {
               script {
                   // List objects in the / directory
                   sh 'ls /'
               }
           }
       }
   }
   
   post {
       success {
           emailext (
                     subject: 'Success: Jenkins Pipeline Status',
                     body: 'The Jenkins pipeline has succeeded.',
                     to: '[email protected]'
                     )
       }
       failure {
           emailext (
                     subject: 'Failure: Jenkins Pipeline Status',
                     body: 'The Jenkins pipeline has failed.',
                     to: '[email protected]'
                     )
       }
   }
}

-----------------------------------------------------------------------------------------------------------------------
9 ماه پیش در تاریخ 1402/08/24 منتشر شده است.
363 بـار بازدید شده
... بیشتر