From 816de590275d9c54836a50316bbbd8cbf170552d Mon Sep 17 00:00:00 2001 From: Kris Lamoureux Date: Thu, 17 Sep 2020 01:01:15 -0400 Subject: [PATCH] Email on Jenkins build failure --- Jenkinsfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 8a36b3b..6b65939 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -15,4 +15,12 @@ pipeline { } } } + post { + failure { + mail to: "${env.EMAIL}", + subject: "$JOB_NAME - Build # $BUILD_NUMBER - ${currentBuild.result}!", + body: "Check console output at $BUILD_URL to view the results." + + } + } }