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

Описание к видео Jenkins email configuration , send an email when the pipeline is successfule or failed using aws ses

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]'
)
}
}
}

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

Комментарии

Информация по комментариям в разработке