mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-03-03 08:19:15 +00:00
HHH-15538 Move Jenkinsfile timeout around shell command
This commit is contained in:
parent
6b8a782d50
commit
f8c25fda1c
10
Jenkinsfile
vendored
10
Jenkinsfile
vendored
@ -257,7 +257,7 @@ void runBuildOnNode(String label, Closure body) {
|
||||
node( label ) {
|
||||
pruneDockerContainers()
|
||||
try {
|
||||
timeout( [time: 120, unit: 'MINUTES'], body )
|
||||
body()
|
||||
}
|
||||
finally {
|
||||
// If this is a PR, we clean the workspace at the end
|
||||
@ -281,11 +281,15 @@ void runTest(String goal, String lockableResource = null, boolean clean = true)
|
||||
String cmd = "./gradlew" + (clean ? " clean" : "") + " check ${goal} -Plog-test-progress=true --stacktrace";
|
||||
try {
|
||||
if (lockableResource == null) {
|
||||
sh cmd
|
||||
timeout( [time: 120, unit: 'MINUTES'] ) {
|
||||
sh cmd
|
||||
}
|
||||
}
|
||||
else {
|
||||
lock(lockableResource) {
|
||||
sh cmd
|
||||
timeout( [time: 120, unit: 'MINUTES'] ) {
|
||||
sh cmd
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user