summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Scarpino <me@andreascarpino.it>2016-08-09 11:19:56 +0200
committerAndrea Scarpino <me@andreascarpino.it>2017-01-19 17:20:47 +0100
commit454259ed30823739c357257de0324b31c79d5645 (patch)
treeddb7f3de8625c3e6b18b0a4b3c22847e5f8fc86d
parent0a8928f51ac5b74553e42bca365175bd4488b13d (diff)
downloadpython-jenkins-job-builder-454259ed30823739c357257de0324b31c79d5645.tar.gz
python-jenkins-job-builder-454259ed30823739c357257de0324b31c79d5645.tar.xz
python-jenkins-job-builder-454259ed30823739c357257de0324b31c79d5645.zip
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
-rw-r--r--jenkins_jobs/modules/reporters.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/jenkins_jobs/modules/reporters.py b/jenkins_jobs/modules/reporters.py
index 86ab179b..db9f417f 100644
--- a/jenkins_jobs/modules/reporters.py
+++ b/jenkins_jobs/modules/reporters.py
@@ -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):