From 03f3878feccecb3c9ed7c64cdca9776563488a98 Mon Sep 17 00:00:00 2001 From: Georgy Redkozubov Date: Thu, 27 Jun 2013 10:15:03 +0400 Subject: Add mangle job for updating email notification recipients. --- utils/mangle-jobs/email-ext-notification-set.mangle | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 utils/mangle-jobs/email-ext-notification-set.mangle (limited to 'utils') 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 -- cgit v1.2.3