From bde6559b0dcf154a2d42cce976cf8a9e8953c188 Mon Sep 17 00:00:00 2001 From: Mason Packard Date: Wed, 14 Sep 2016 16:30:00 -0400 Subject: [PATCH] Help ensure cleanup on errors. --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8e683d3..176f449 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -75,11 +75,11 @@ def performBuild(String project){ } catch (err) { - handleError("BUILD ERROR: There was a problem with ${project} Appliance. ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL} |Open>) \n\n ${err}") + handleError("BUILD ERROR: There was a problem with ${project} Appliance. ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL} |Open>) \n\n ${err}", ${project}) } } -def handleError(String message){ +def handleError(String message, string project){ echo "${message}" currentBuild.setResult("FAILED") slackSend color: 'danger', message: "${message}"