summaryrefslogtreecommitdiff
path: root/mangle-jobs/jenkins-url-set.mangle
blob: 89c7233fe4a51747d7097e8c30401603178ba2ad (plain)
1
2
3
4
5
6
7
8
9
10
11
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")