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

          Alex Taylor created issue -
          Alex Taylor made changes -
          Attachment New: Screen Shot 2020-03-19 at 12.43.38 PM.png [ 50712 ]
          Alex Taylor made changes -
          Description Original: 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:
          {code:java}
          pipeline {
              agent any
              checkout
              stages {
                  stage('Build') {
                      steps {
                         echo "hello"
                      }
                  }
                  stage('Test') {
                      steps {
                         echo "hello"
                      }
                  }
                  stage('Deploy') {
                      steps {
                         echo "hello"
                      }
                  }
              }
          }
          {code}

          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.

          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
          New: 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:
          {code:java}
          pipeline {
              agent any
              checkout
              stages {
                  stage('Build') {
                      steps {
                         echo "hello"
                      }
                  }
                  stage('Test') {
                      steps {
                         echo "hello"
                      }
                  }
                  stage('Deploy') {
                      steps {
                         echo "hello"
                      }
                  }
              }
          }
          {code}

          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:
           !Screen Shot 2020-03-19 at 12.43.38 PM.png|thumbnail!

          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
          Alex Taylor made changes -
          Assignee Original: Sam Van Oort [ svanoort ] New: Alex Taylor [ ataylor ]
          prakash raj made changes -
          Assignee Original: Alex Taylor [ ataylor ] New: prakash raj [ prakashraj ]
          prakash raj made changes -
          Assignee Original: prakash raj [ prakashraj ]

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

              Created:
              Updated: