Use extended email to send emails on failed build
This commit is contained in:
parent
c681874522
commit
d7fae344ef
1 changed files with 26 additions and 0 deletions
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue