Merge "Support the new Always trigger type."
This commit is contained in:
commit
1441ebf485
@ -1392,6 +1392,7 @@ def email_ext(parser, xml_parent, data):
|
||||
javascript to hook into the Jenkins API itself
|
||||
: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 bool always: Send an email for every 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
|
||||
(default false)
|
||||
@ -1426,6 +1427,8 @@ def email_ext(parser, xml_parent, data):
|
||||
else:
|
||||
XML.SubElement(emailext, 'recipientList').text = '$DEFAULT_RECIPIENTS'
|
||||
ctrigger = XML.SubElement(emailext, 'configuredTriggers')
|
||||
if data.get('always', False):
|
||||
base_email_ext(parser, ctrigger, data, 'AlwaysTrigger')
|
||||
if data.get('unstable', False):
|
||||
base_email_ext(parser, ctrigger, data, 'UnstableTrigger')
|
||||
if data.get('first-failure', False):
|
||||
|
@ -4,6 +4,17 @@
|
||||
<hudson.plugins.emailext.ExtendedEmailPublisher>
|
||||
<recipientList>foo@example.com, bar@example.com</recipientList>
|
||||
<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>
|
||||
<email>
|
||||
<recipientList/>
|
||||
|
@ -7,6 +7,7 @@ publishers:
|
||||
body: The build has finished
|
||||
attach-build-log: false
|
||||
attachments: "*/foo*.log"
|
||||
always: true
|
||||
unstable: true
|
||||
first-failure: true
|
||||
not-built: true
|
||||
|
Loading…
Reference in New Issue
Block a user