Merge lp:~gesha/linaro-android-build-tools/update-email-notification-mangle into lp:linaro-android-build-tools

Proposed by Georgy Redkozubov
Status: Merged
Approved by: Milo Casagrande
Approved revision: 635
Merged at revision: 635
Proposed branch: lp:~gesha/linaro-android-build-tools/update-email-notification-mangle
Merge into: lp:linaro-android-build-tools
Diff against target: 24 lines (+20/-0)
1 file modified
utils/mangle-jobs/email-ext-notification-set.mangle (+20/-0)
To merge this branch: bzr merge lp:~gesha/linaro-android-build-tools/update-email-notification-mangle
Reviewer Review Type Date Requested Status
Milo Casagrande (community) Approve
Review via email: mp+171719@code.launchpad.net

Description of the change

This branch adds mangle job for updating email notification recipients.

To post a comment you must log in.
Revision history for this message
Milo Casagrande (milo) wrote :

Looks good to me.
+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'utils/mangle-jobs/email-ext-notification-set.mangle'
2--- utils/mangle-jobs/email-ext-notification-set.mangle 1970-01-01 00:00:00 +0000
3+++ utils/mangle-jobs/email-ext-notification-set.mangle 2013-06-27 06:17:29 +0000
4@@ -0,0 +1,20 @@
5+#
6+# Update email notification recepient list
7+#
8+
9+from mangle_helper import *
10+
11+
12+builders = 'linaro-android-builder-notifications@linaro.org'
13+restricted_builders = 'linaro-android-restricted-builder-notifications@linaro.org'
14+
15+def mangle(tree):
16+ if not tree.xpath('//hudson.plugins.emailext.ExtendedEmailPublisher'):
17+ # If node doesn't exist do nothing.
18+ return
19+ tags = tree.xpath('/project/publishers/hudson.plugins.emailext.ExtendedEmailPublisher/recipientList')
20+ cfg = get_build_config(tree)
21+ if cfg.get("BUILD_TYPE", "build-android") == "build-android-restricted":
22+ tags[0].text = restricted_builders
23+ else:
24+ tags[0].text = builders

Subscribers

People subscribed via source and target branches