catchError with timeout : the build result is always ABORTED whatever the configured buildResult

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      Whatever the way catchError is configured, a timeout block ends the build as ABORTED if the timeout fires.
      Here is a test case job to reproduce this :

       

      @Library("EvlinkCiLib@EVL-1262-ci-install-kw-and-cross-compilation-build-chain-for-lms") _pipeline {
          agent { label 'buster' }
          environment {
              pipeName="TimedOut Job"
              projectDir='timeout'
          }
          stages {
              stage('timedOut node NOK'){
                  steps {
                      timeout(time: 10, unit: 'SECONDS') {
                          catchError(catchInterruptions: false,message: 'Cannot contact slave',buildResult: 'SUCCESS', stageResult: 'UNSTABLE') {
                              // This node exists but is not connected
                              node(label: 'rpi') {
                                  sh('uname -a')
                              }
                          }
                      }
                  }
              }
              stage('timedOut node OK'){
                  // The node 'buster' is OK
                  steps {
                      catchError(catchInterruptions: false,message: 'Cannot contact slave',buildResult: 'SUCCESS', stageResult: 'UNSTABLE') {
                          timeout(time: 10, unit: 'SECONDS') {
                              node(label: 'buster') {
                                  sh('uname -a')
                              }
                          }
                      }
                  }
              }
          }
      }
      

       

            Assignee:
            Unassigned
            Reporter:
            Jean-Luc Pé
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: