Reporters: fix typo and support 'perModuleEmail'

hudson.maven.reporters.Mailer is a typo as it never existed.

Support "Send email for each failed module" via perModuleEmail attribute.

Change-Id: I6ef493a097a10326b67295775a9522c95c2fee2f
This commit is contained in:
Andrea Scarpino 2016-08-09 11:19:56 +02:00
parent 0a8928f51a
commit 454259ed30

View File

@ -48,6 +48,8 @@ def email(registry, xml_parent, data):
unstable build (default true)
:arg bool send-to-individuals: Send an email to the individual
who broke the build (default false)
:arg bool notify-for-each-module: Send an email for each module
(e.g. failed, unstable). (default true)
Example::
@ -57,7 +59,7 @@ def email(registry, xml_parent, data):
"""
mailer = XML.SubElement(xml_parent,
'hudson.maven.reporters.Mailer')
'hudson.maven.reporters.MavenMailer')
XML.SubElement(mailer, 'recipients').text = data['recipients']
# Note the logic reversal (included here to match the GUI
@ -67,8 +69,8 @@ def email(registry, xml_parent, data):
XML.SubElement(mailer, 'dontNotifyEveryUnstableBuild').text = 'true'
XML.SubElement(mailer, 'sendToIndividuals').text = str(
data.get('send-to-individuals', False)).lower()
# TODO: figure out what this is:
XML.SubElement(mailer, 'perModuleEmail').text = 'true'
XML.SubElement(mailer, 'perModuleEmail').text = str(
data.get('notify-for-every-module', True)).lower()
def findbugs(registry, xml_parent, data):