Merge lp:~gesha/linaro-android-build-tools/build-timeout into lp:linaro-android-build-tools

Proposed by Georgy Redkozubov
Status: Merged
Approved by: Paul Sokolovsky
Approved revision: 411
Merged at revision: 411
Proposed branch: lp:~gesha/linaro-android-build-tools/build-timeout
Merge into: lp:linaro-android-build-tools
Diff against target: 26 lines (+22/-0)
1 file modified
utils/mangle-jobs/add-build-timeout.mangle (+22/-0)
To merge this branch: bzr merge lp:~gesha/linaro-android-build-tools/build-timeout
Reviewer Review Type Date Requested Status
Paul Sokolovsky Approve
Review via email: mp+92391@code.launchpad.net

Description of the change

add-build-timeout.mangle adds build-timeout plugin to all Jenkins jobs that don't have it in their configuration

To post a comment you must log in.
Revision history for this message
Paul Sokolovsky (pfalcon) wrote :

Looks good!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'utils/mangle-jobs/add-build-timeout.mangle'
2--- utils/mangle-jobs/add-build-timeout.mangle 1970-01-01 00:00:00 +0000
3+++ utils/mangle-jobs/add-build-timeout.mangle 2012-02-09 23:19:17 +0000
4@@ -0,0 +1,22 @@
5+# Add build-timeout plugin setup for build dependencies
6+
7+#from lxml.etree import Element
8+from lxml.etree import fromstring
9+
10+new_node = """\
11+ <hudson.plugins.build__timeout.BuildTimeoutWrapper>
12+ <timeoutMinutes>150</timeoutMinutes>
13+ <failBuild>false</failBuild>
14+ </hudson.plugins.build__timeout.BuildTimeoutWrapper>
15+"""
16+
17+def mangle(tree):
18+ if tree.xpath("//hudson.plugins.build__timeout.BuildTimeoutWrapper"):
19+ # Already there
20+ return
21+ tag = tree.xpath('/project/buildWrappers')[0]
22+ node = fromstring(new_node)
23+ tag.append(node)
24+ if node.getprevious():
25+ node.getprevious().tail += " "
26+ node.tail = "\n "

Subscribers

People subscribed via source and target branches