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

XMLWordPrintable

      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

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

              Created:
              Updated: