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

Using Stage view with mixed in/out of stage actions causes the build status to be wrong

      Issue:
      In declarative when you have a series of stages with one action outside of those stages that fails, it will cause the stage view status (the blue/red ball on the left side of the view) to show the incorrect status of the build.

      Steps to reproduce:
      Create a pipeline with this as the definition:

      pipeline {
          agent any 
          checkout
          stages {
              stage('Build') { 
                  steps {
                     echo "hello"
                  }
              }
              stage('Test') { 
                  steps {
                     echo "hello"
                  }
              }
              stage('Deploy') { 
                  steps {
                     echo "hello"
                  }
              }
          }
      }
      

      Run that code and look at the stage view to see that it appears the build was successful but it clearly failed on the build status screen on the left. Build 203 looks correct and build 204 is the one with the incorrect status indicator:

      Expected results:
      The stage view page correctly shows the build status being failed.

      The biggest issue with this is that if a build fails to checkout its Jenkinsfile it will do this same thing which causes a problem where the build looks successful when it actually wasn't

          [JENKINS-61591] Using Stage view with mixed in/out of stage actions causes the build status to be wrong

          Devin Nusbaum added a comment -

          Is this a recent regression, or has it always been broken?

          Devin Nusbaum added a comment - Is this a recent regression, or has it always been broken?

          Alex Taylor added a comment -

          dnusbaum Always been a problem with declarative and stage view as far back as I can tell. It does not replicate with scripted syntax in any way I have tried locally

          Alex Taylor added a comment - dnusbaum Always been a problem with declarative and stage view as far back as I can tell. It does not replicate with scripted syntax in any way I have tried locally

          Alex Taylor added a comment -

          Alex Taylor added a comment - Fixed with https://github.com/jenkinsci/pipeline-stage-view-plugin/pull/85

            Unassigned Unassigned
            ataylor Alex Taylor
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: