aboutsummaryrefslogtreecommitdiff
path: root/utils/mangle-jobs/build-timeout-set.mangle
blob: 7d26e08b24ca51d788bf76f35831b0b14b8e8744 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Update default build timeout value to new default.
# Don't touch custom timeout times

OLD_DEFAULT = "255"
NEW_DEFAULT = "275"


def mangle(tree):
    tags = tree.xpath("//hudson.plugins.build__timeout.BuildTimeoutWrapper/timeoutMinutes")
    if not tags:
        return False
    tag = tags[0]
    if tag.text != OLD_DEFAULT:
        return False
    tag.text = NEW_DEFAULT