diff options
author | Adam Kocoloski <kocolosk@apache.org> | 2022-01-18 21:08:29 -0500 |
---|---|---|
committer | Adam Kocoloski <kocolosk@apache.org> | 2022-01-19 21:39:09 -0500 |
commit | 35d75b15c54a4d8820e091c29afe328a04dfcb46 (patch) | |
tree | 5446c126abb01cf56097aea10ebec10835b36953 | |
parent | 004f79926697669e19ebc88cbf43175da2dc6f63 (diff) | |
download | couchdb-35d75b15c54a4d8820e091c29afe328a04dfcb46.tar.gz |
Start stage-specific timers after acquiring agent
This avoids the situation where a build fails with a timeout because
all the docker-based agents were busy running other jobs. Jenkins'
semantics for options.timeout is that the stage-specific timeout starts
the countdown even while waiting for an agent matching the selected
label to become available. We see occasional spurious job failures as a
result.
-rw-r--r-- | build-aux/Jenkinsfile.pr | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/build-aux/Jenkinsfile.pr b/build-aux/Jenkinsfile.pr index 1b8ebdff5..34955f6bb 100644 --- a/build-aux/Jenkinsfile.pr +++ b/build-aux/Jenkinsfile.pr @@ -72,18 +72,17 @@ pipeline { registryCredentialsId 'dockerhub_creds' } } - options { - timeout(time: 15, unit: "MINUTES") - } steps { - sh ''' - set - rm -rf apache-couchdb-* - ./configure - make erlfmt-check - make dist - chmod -R a+w * . - ''' + timeout(time: 15, unit: "MINUTES") { + sh ''' + set + rm -rf apache-couchdb-* + ./configure + make erlfmt-check + make dist + chmod -R a+w * . + ''' + } } post { success { @@ -121,11 +120,12 @@ pipeline { } options { skipDefaultCheckout() - timeout(time: 90, unit: "MINUTES") } steps { - unstash 'tarball' - sh( script: build_and_test ) + timeout(time: 90, unit: "MINUTES") { + unstash 'tarball' + sh( script: build_and_test ) + } } post { always { |