You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ko...@apache.org on 2022/01/19 02:28:03 UTC

[couchdb] 03/04: Start stage-specific timers after acquiring agent

This is an automated email from the ASF dual-hosted git repository.

kocolosk pushed a commit to branch improve-pr-jenkinsfile
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 423dd61b88804f32af5463e1af58980722d7af28
Author: Adam Kocoloski <ko...@apache.org>
AuthorDate: Tue Jan 18 21:08:29 2022 -0500

    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.
---
 build-aux/Jenkinsfile.pr | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/build-aux/Jenkinsfile.pr b/build-aux/Jenkinsfile.pr
index 1b8ebdf..34955f6 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 {