From 2fc555094a7ba90540de7d02543a66909d84d126 Mon Sep 17 00:00:00 2001 From: tgrogers Date: Wed, 19 Jul 2017 16:01:30 -0400 Subject: Trying a different auto-email --- Jenkinsfile | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'Jenkinsfile') diff --git a/Jenkinsfile b/Jenkinsfile index 8c05427..a510f40 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,13 +17,17 @@ pipeline { ./util/job_launching/run_simulations.py -N regress && \ ./util/job_launching/monitor_func_test.py -v -N regress' - emailex - body: "$JOB_NAME - $BRANCH_NAME - Build # currentBuild.number - currentBuild.result: Check console output at $BUILD_URL to view the results.", - recipientProviders: [[$class: "CulpritsRecipientProvider"], - [$class: "RequesterRecipientProvider"]], - replyTo: "tgrogers@purdue.edu", - subject: "[AALP Jenkins]: $JOB_NAME - Build # currentBuild.number - currentBuild.result!", - to: 'tgrogers@purdue.edu' + + def to = emailextrecipients([ + [$class: 'CulpritsRecipientProvider'], + [$class: 'DevelopersRecipientProvider'], + [$class: 'RequesterRecipientProvider'] + ]) + + if(to != null && !to.isEmpty()) { + mail to: to, subject: "[AALP Jenkins] Build ${currentBuild.result}!", + body: "See ${env.BUILD_URL}" + } } } } -- cgit v1.3