From 94498596143809670af6d1efa80767793f1adb20 Mon Sep 17 00:00:00 2001 From: Mason Packard Date: Fri, 12 Aug 2016 16:25:11 -0400 Subject: [PATCH] Change format of mailer for error handling in jenkins pipeline. --- Jenkinsfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index bf2945d..ed94faa 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -62,8 +62,6 @@ def handleError(String message){ echo "${message}" currentBuild.setResult("FAILED") slackSend color: 'danger', message: "${message}" - withCredentials([[$class: 'FileBinding', credentialsId: 'email-error-id', variable: 'EMAIL']]) { - step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: 'EMAIL', sendToIndividuals: true]) - } + step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: "$email-error-id", sendToIndividuals: true]) sh 'exit 1' }