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

catchError should give a visual hint in which stage the error occurred

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • blueocean-plugin
    • None

      When using catchError in a stage and the steps in catchError fail, then no visual feedback on the pipeline view is given in which stage it failed. You have to click on each individual stage to find the bad one.

      It would be better if the stage would be rendered red as for normal failures

          [JENKINS-52005] catchError should give a visual hint in which stage the error occurred

          Craig Rodrigues added a comment - - edited

          I can reproduce this problem with this pipeline:

          pipeline {
              agent any
              
              stages {
                  stage("Remove file which does not exist") {
                      steps {
                         catchError {
                              sh("rm /nonexistent")
                          }
                      }
                  }
                  
                  stage("Hello!") {
                      steps {
                          sh("echo Hello1")
                      }
                  }
              }
          }
          

          The Remove file which does not exist node should be red, but it is green.

          Craig Rodrigues added a comment - - edited I can reproduce this problem with this pipeline: pipeline { agent any stages { stage("Remove file which does not exist") { steps { catchError { sh("rm /nonexistent") } } } stage("Hello!") { steps { sh("echo Hello1") } } } } The Remove file which does not exist node should be red, but it is green.

          Alexandr Semak added a comment - - edited
          node {
              stage("successful"){
                  echo "successful stage"
              }
              stage("unstable"){
                  catchError(buildResult: 'SUCCESS', stageResult: 'UNSTABLE'){
                      sh "gooo version"
                  }
              }
              stage("continue working"){
                  echo "continue working"
              }
          }
          

          I also have this is issue.
          Jenkins v2.164.3(Basic Steps 2.18) already installer doesn't work if I update Basic Steps but when I was testing on new spiup Jenkins with the same version 2.164.3 it is work

          Alexandr Semak added a comment - - edited node { stage( "successful" ){ echo "successful stage" } stage( "unstable" ){ catchError(buildResult: 'SUCCESS' , stageResult: 'UNSTABLE' ){ sh "gooo version" } } stage( " continue working" ){ echo " continue working" } } I also have this is issue. Jenkins v2.164.3(Basic Steps 2.18) already installer doesn't work if I update Basic Steps but when I was testing on new spiup Jenkins with the same version 2.164.3 it is work

          having the same problem. Stage fails , but doesn't show up in OpenBlueOcean visualization.  Post stage action failure{} gets executed giving a hint that currentBuild.Result = FAILURE, but interestingly the following stages get executed while not expected to do so.

          Anupama Janakiram added a comment - having the same problem. Stage fails , but doesn't show up in OpenBlueOcean visualization.  Post stage action failure{} gets executed giving a hint that currentBuild.Result = FAILURE, but interestingly the following stages get executed while not expected to do so.

            Unassigned Unassigned
            kutzi kutzi
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: