diff options
author | Georgy Redkozubov <georgy.redkozubov@linaro.org> | 2013-06-27 10:15:03 +0400 |
---|---|---|
committer | Georgy Redkozubov <georgy.redkozubov@linaro.org> | 2013-06-27 10:15:03 +0400 |
commit | 03f3878feccecb3c9ed7c64cdca9776563488a98 (patch) | |
tree | 476f85f16566affd2bf8ab664a28fe347d2ab597 /utils/mangle-jobs/email-ext-notification-set.mangle | |
parent | c9109dca81f47eaef73685bf66e88439787508da (diff) |
Add mangle job for updating email notification recipients.
Diffstat (limited to 'utils/mangle-jobs/email-ext-notification-set.mangle')
-rw-r--r-- | utils/mangle-jobs/email-ext-notification-set.mangle | 20 |
1 files changed, 20 insertions, 0 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 |