aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorPaul Sokolovsky <paul.sokolovsky@linaro.org>2013-07-01 16:08:29 +0300
committerPaul Sokolovsky <paul.sokolovsky@linaro.org>2013-07-01 16:08:29 +0300
commitd48b20edc9b6e8c0a15c25605bf96498af5a217b (patch)
treec1c65ff17be9f540f6516f52e296c2700296bbcf /utils
parent2094591db5795029b82de38e4a2b12362c825b31 (diff)
parent06f46bf22e367c100ecb74e73d3abcfe3b5798c5 (diff)
[merge]
Diffstat (limited to 'utils')
-rw-r--r--utils/mangle-jobs/email-ext-notification-set.mangle20
-rw-r--r--utils/mangle-jobs/mangle_helper.py2
2 files changed, 21 insertions, 1 deletions
diff --git a/utils/mangle-jobs/email-ext-notification-set.mangle b/utils/mangle-jobs/email-ext-notification-set.mangle
new file mode 100644
index 0000000..73b0dc0
--- /dev/null
+++ b/utils/mangle-jobs/email-ext-notification-set.mangle
@@ -0,0 +1,20 @@
+#
+# Update email notification recepient list
+#
+
+from mangle_helper import *
+
+
+builders = 'linaro-android-builder-notifications@linaro.org'
+restricted_builders = 'linaro-android-restricted-builder-notifications@linaro.org'
+
+def mangle(tree):
+ if not tree.xpath('//hudson.plugins.emailext.ExtendedEmailPublisher'):
+ # If node doesn't exist do nothing.
+ return
+ tags = tree.xpath('/project/publishers/hudson.plugins.emailext.ExtendedEmailPublisher/recipientList')
+ cfg = get_build_config(tree)
+ if cfg.get("BUILD_TYPE", "build-android") == "build-android-restricted":
+ tags[0].text = restricted_builders
+ else:
+ tags[0].text = builders
diff --git a/utils/mangle-jobs/mangle_helper.py b/utils/mangle-jobs/mangle_helper.py
index 4810873..93735a9 100644
--- a/utils/mangle-jobs/mangle_helper.py
+++ b/utils/mangle-jobs/mangle_helper.py
@@ -11,7 +11,7 @@ def get_build_config(tree):
l = l.strip()
if not l or l[0] == "#":
continue
- k, v = l.split("=")
+ k, v = l.split("=", 1)
d[k] = v
return d