Skip to content

Commit a4b47d3

Browse files
committed
HHH-15538 Move Jenkinsfile timeout around shell command
1 parent 1987d69 commit a4b47d3

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Jenkinsfile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ void runBuildOnNode(String label, Closure body) {
281281
node( label ) {
282282
pruneDockerContainers()
283283
try {
284-
timeout( [time: 200, unit: 'MINUTES'], body )
284+
body()
285285
}
286286
finally {
287287
// If this is a PR, we clean the workspace at the end
@@ -305,11 +305,15 @@ void runTest(String goal, String lockableResource = null, boolean clean = true)
305305
String cmd = "./gradlew" + (clean ? " clean" : "") + " check ${goal} -Plog-test-progress=true --stacktrace";
306306
try {
307307
if (lockableResource == null) {
308-
sh cmd
308+
timeout( [time: 200, unit: 'MINUTES'] ) {
309+
sh cmd
310+
}
309311
}
310312
else {
311313
lock(lockableResource) {
312-
sh cmd
314+
timeout( [time: 200, unit: 'MINUTES'] ) {
315+
sh cmd
316+
}
313317
}
314318
}
315319
}

0 commit comments

Comments
 (0)