Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-60239

Aborted catchError sets build result to ABORTED if fail fast is true

XMLWordPrintable

      Hello, 

      I have the following declarative pipeline:

      pipeline {
      	
          agent any
      
          options { 
              parallelsAlwaysFailFast() 
          }
          	
          stages {
              stage('A') {
                  parallel {
                      stage('A1') {
                          steps { 
                              error 'fail' 
                          }
                      }
                      
                      stage('A2') {
                          steps { 
                              script {
                                  catchError(stageResult: 'FAILURE') {
                                      println 'a2'
                                      sleep 10
                                  }
                              }
                          }
                      }
                  }
              }
          }
      }
      

      The result is ABORTED instead of FAILURE.
      I think that somehow aborting a stage that contains a catchError affects the build result.

      For me the expected result is FAILURE

            abayer Andrew Bayer
            dpuiu Daniel Puiu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: