Manage Jenkins -> Configure System
Note: To configure SES (Simple Email Service) on AWS follow check my notes.
To send an email in the event of failure:
pipeline {
agent ...
stages ...
post {
failure {
mail to: 'mickey.mouse@disney.com',
subject: "Failed Pipeline: ${currentBuild.fullDisplayName}",
body: "Something is wrong with ${env.BUILD_URL}"
}
}
}