Merge "Change default Reply-To header to $DEFAULT_REPLYTO."

This commit is contained in:
Jenkins 2014-07-10 16:25:16 +00:00 committed by Gerrit Code Review
commit 8356a907ae
3 changed files with 39 additions and 2 deletions
jenkins_jobs/modules
tests/publishers/fixtures

@ -1346,7 +1346,7 @@ def email_ext(parser, xml_parent, data):
:arg str recipients: Comma separated list of emails
:arg str reply-to: Comma separated list of emails that should be in
the Reply-To header for this project (default $DEFAULT_RECIPIENTS)
the Reply-To header for this project (default $DEFAULT_REPLYTO)
:arg str content-type: The content type of the emails sent. If not set, the
Jenkins plugin uses the value set on the main configuration page.
Possible values: 'html', 'text' or 'default' (default 'default')
@ -1455,7 +1455,7 @@ def email_ext(parser, xml_parent, data):
XML.SubElement(emailext, 'attachBuildLog').text = \
str(data.get('attach-build-log', False)).lower()
XML.SubElement(emailext, 'replyTo').text = data.get('reply-to',
'$DEFAULT_RECIPIENTS')
'$DEFAULT_REPLYTO')
matrix_dict = {'both': 'BOTH',
'only-configurations': 'ONLY_CONFIGURATIONS',
'only-parent': 'ONLY_PARENT'}

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<project>
<publishers>
<hudson.plugins.emailext.ExtendedEmailPublisher>
<recipientList>$DEFAULT_RECIPIENTS</recipientList>
<configuredTriggers>
<hudson.plugins.emailext.plugins.trigger.FailureTrigger>
<email>
<recipientList/>
<subject>$PROJECT_DEFAULT_SUBJECT</subject>
<body>$PROJECT_DEFAULT_CONTENT</body>
<sendToRequester>false</sendToRequester>
<sendToDevelopers>false</sendToDevelopers>
<includeCulprits>false</includeCulprits>
<sendToRecipientList>true</sendToRecipientList>
</email>
</hudson.plugins.emailext.plugins.trigger.FailureTrigger>
</configuredTriggers>
<contentType>text/html</contentType>
<defaultSubject>Subject for Build ${BUILD_NUMBER}</defaultSubject>
<defaultContent>The build has finished</defaultContent>
<attachmentsPattern>*/foo*.log</attachmentsPattern>
<presendScript/>
<attachBuildLog>false</attachBuildLog>
<replyTo>$DEFAULT_REPLYTO</replyTo>
<matrixTriggerMode>ONLY_CONFIGURATIONS</matrixTriggerMode>
</hudson.plugins.emailext.ExtendedEmailPublisher>
</publishers>
</project>

@ -0,0 +1,8 @@
publishers:
- email-ext:
content-type: html
subject: Subject for Build ${BUILD_NUMBER}
body: The build has finished
attach-build-log: false
attachments: "*/foo*.log"
matrix-trigger: only-configurations