Рет қаралды 452
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: '04shivm@gmail.com'
)
}
failure {
emailext (
subject: 'Failure: Jenkins Pipeline Status',
body: 'The Jenkins pipeline has failed.',
to: '04shivm@gmail.com'
)
}
}
}
-----------------------------------------------------------------------------------------------------------------------