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

    Details

    • Similar Issues:

      Description

      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

        Attachments

          Activity

          Hide
          dnusbaum Devin Nusbaum added a comment -

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

          Show
          dnusbaum Devin Nusbaum added a comment - Is this a recent regression, or has it always been broken?
          Hide
          ataylor Alex Taylor added a comment -

          Devin Nusbaum 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

          Show
          ataylor Alex Taylor added a comment - Devin Nusbaum 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
          Show
          ataylor Alex Taylor added a comment - Fixed with https://github.com/jenkinsci/pipeline-stage-view-plugin/pull/85

            People

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

              Dates

              • Created:
                Updated: