diff --git a/build/postactions.groovy b/build/postactions.groovy index fb0fc93..dca6672 100644 --- a/build/postactions.groovy +++ b/build/postactions.groovy @@ -36,6 +36,9 @@ "To": [ "dan.hawkins@globalinkjetsystems.com" ] + }, + "ExtEmail": { + "Description": "Send an email using Extended Email plugin" } } } @@ -156,6 +159,26 @@ def sendemails(emailtolist) { } } +def sendextemail() { + emailext( + subject: "Failed build: ${JOB_NAME} ${BUILD_DISPLAY_NAME}", + body: """ + ${JELLY_SCRIPT,template="html"} + """, + attachLog: true, + attachmentsPattern: '', + compressLog: false, + // from : '', + // mimeType: '', + // postsendScript: '', + // presendScript: '', + recipientProviders: [culprits(), requestor(), developers()], // Could be: buildUser, culprits, developers, brokenTestsSuspects, brokenBuildSuspects, recipients, requestor, upstreamDevelopers + // replyTo: '', + // saveOutput: true, + // to: '', + ) +} + def performFailedBuildActions() { def postbuildactions = null if (params.POST_BUILD_INFO != null) { @@ -172,6 +195,9 @@ def performFailedBuildActions() { if (emailtolist) { sendemails(emailtolist) } + if (postbuildactions['ExtEmail']) { + sendextemail() + } } }