summaryrefslogtreecommitdiff
path: root/mangle-jobs
diff options
context:
space:
mode:
authorPaul Sokolovsky <paul.sokolovsky@linaro.org>2014-06-25 01:30:18 +0300
committerPaul Sokolovsky <paul.sokolovsky@linaro.org>2014-06-25 01:30:18 +0300
commit9a38ed971f2b81d6ddfcf1b3dbac0b7f30cb7115 (patch)
treebf2d5bf3ac35bd8114df9526e809b9a08e779456 /mangle-jobs
parent8f096fa24d932ec455c3e5168b1acca73a09e1ba (diff)
mangle-jobs: Add script to set Jenkins URL.
Change-Id: Ie4820f723c2d4e9f9597170b1a455589ca98c9d0
Diffstat (limited to 'mangle-jobs')
-rw-r--r--mangle-jobs/jenkins-url-set.mangle12
1 files changed, 12 insertions, 0 deletions
diff --git a/mangle-jobs/jenkins-url-set.mangle b/mangle-jobs/jenkins-url-set.mangle
new file mode 100644
index 0000000..89c7233
--- /dev/null
+++ b/mangle-jobs/jenkins-url-set.mangle
@@ -0,0 +1,12 @@
+# Update Jenkins URL to use current server
+# This should be run against
+# hudson.tasks.Mailer.xml
+
+import os
+
+def mangle(tree):
+ tags = tree.xpath("/hudson.tasks.Mailer_-DescriptorImpl/hudsonUrl")
+ if not tags:
+ return False
+ for tag in tags:
+ tag.text = os.getenv("JENKINS_URL")