From 5053f377f795cbf6173b1bc7be20d34fa6cc37de Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Sun, 21 Nov 2021 09:44:35 +0000 Subject: [PATCH] Use extended email to send emails on failed build --- build/postactions.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/postactions.groovy b/build/postactions.groovy index a7b0d7d..27a843e 100644 --- a/build/postactions.groovy +++ b/build/postactions.groovy @@ -192,7 +192,7 @@ def sendextemail(extmailinfo) { def recipientProviders = getRecipientProviders(extmailinfo['Recipient providers']) def toList = getToList(extmailinfo['To']) - if (toList.size() == 0) { + if (!toList) { emailext( subject: "[Jenkins] Failed build: ${JOB_NAME} ${BUILD_DISPLAY_NAME}", body: '''${JELLY_SCRIPT,template="html"}''',