Support the new Always trigger type.
Support for this trigger was added in email-ext v2.36. See https://issues.jenkins-ci.org/browse/JENKINS-20013 for more details. Change-Id: Ibfb3ec96218fc7133439e17853638593fed41a44
This commit is contained in:
parent
bed596e8c6
commit
abaa7fde6c
@ -1392,6 +1392,7 @@ def email_ext(parser, xml_parent, data):
|
|||||||
javascript to hook into the Jenkins API itself
|
javascript to hook into the Jenkins API itself
|
||||||
:arg bool attach-build-log: Include build log in the email (default false)
|
:arg bool attach-build-log: Include build log in the email (default false)
|
||||||
:arg str attachments: pattern of files to include as attachment (optional)
|
:arg str attachments: pattern of files to include as attachment (optional)
|
||||||
|
:arg bool always: Send an email for every result (default false)
|
||||||
:arg bool unstable: Send an email for an unstable result (default false)
|
:arg bool unstable: Send an email for an unstable result (default false)
|
||||||
:arg bool first-failure: Send an email for just the first failure
|
:arg bool first-failure: Send an email for just the first failure
|
||||||
(default false)
|
(default false)
|
||||||
@ -1426,6 +1427,8 @@ def email_ext(parser, xml_parent, data):
|
|||||||
else:
|
else:
|
||||||
XML.SubElement(emailext, 'recipientList').text = '$DEFAULT_RECIPIENTS'
|
XML.SubElement(emailext, 'recipientList').text = '$DEFAULT_RECIPIENTS'
|
||||||
ctrigger = XML.SubElement(emailext, 'configuredTriggers')
|
ctrigger = XML.SubElement(emailext, 'configuredTriggers')
|
||||||
|
if data.get('always', False):
|
||||||
|
base_email_ext(parser, ctrigger, data, 'AlwaysTrigger')
|
||||||
if data.get('unstable', False):
|
if data.get('unstable', False):
|
||||||
base_email_ext(parser, ctrigger, data, 'UnstableTrigger')
|
base_email_ext(parser, ctrigger, data, 'UnstableTrigger')
|
||||||
if data.get('first-failure', False):
|
if data.get('first-failure', False):
|
||||||
|
@ -4,6 +4,17 @@
|
|||||||
<hudson.plugins.emailext.ExtendedEmailPublisher>
|
<hudson.plugins.emailext.ExtendedEmailPublisher>
|
||||||
<recipientList>foo@example.com, bar@example.com</recipientList>
|
<recipientList>foo@example.com, bar@example.com</recipientList>
|
||||||
<configuredTriggers>
|
<configuredTriggers>
|
||||||
|
<hudson.plugins.emailext.plugins.trigger.AlwaysTrigger>
|
||||||
|
<email>
|
||||||
|
<recipientList/>
|
||||||
|
<subject>$PROJECT_DEFAULT_SUBJECT</subject>
|
||||||
|
<body>$PROJECT_DEFAULT_CONTENT</body>
|
||||||
|
<sendToDevelopers>false</sendToDevelopers>
|
||||||
|
<sendToRequester>false</sendToRequester>
|
||||||
|
<includeCulprits>false</includeCulprits>
|
||||||
|
<sendToRecipientList>true</sendToRecipientList>
|
||||||
|
</email>
|
||||||
|
</hudson.plugins.emailext.plugins.trigger.AlwaysTrigger>
|
||||||
<hudson.plugins.emailext.plugins.trigger.UnstableTrigger>
|
<hudson.plugins.emailext.plugins.trigger.UnstableTrigger>
|
||||||
<email>
|
<email>
|
||||||
<recipientList/>
|
<recipientList/>
|
||||||
|
@ -7,6 +7,7 @@ publishers:
|
|||||||
body: The build has finished
|
body: The build has finished
|
||||||
attach-build-log: false
|
attach-build-log: false
|
||||||
attachments: "*/foo*.log"
|
attachments: "*/foo*.log"
|
||||||
|
always: true
|
||||||
unstable: true
|
unstable: true
|
||||||
first-failure: true
|
first-failure: true
|
||||||
not-built: true
|
not-built: true
|
||||||
|
Loading…
Reference in New Issue
Block a user