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

Parallel stage with when shown as ran, but it haven't

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • blueocean-plugin
    • None
    • Last version Jenkins with blue ocean

       

      Those steps are shown as ran, but it haven't. Clicking them just says "this stage has no steps"

      This only occurs when a previous stage has failed.

      stage('Deploy release') {
      environment{
      ARTIFACT_VERSION = xxx
      }
      when {
      anyOf {
      branch 'RC'
      branch 'HOTFIX_*'
      branch 'HOTFIX-*'
      }
      }
      parallel{
      stage('Deploy to RC') {
      when {
      anyOf {
      branch 'RC'
      branch 'HOTFIX_*'
      branch 'HOTFIX-*'
      }
      }
      steps {
      deploy(xxx)
      }
      }
      
      stage('Deploy to CERT') {
      when {
      anyOf {
      branch 'RC'
      branch 'HOTFIX_*'
      branch 'HOTFIX-*'
      }
      }
      steps {
      deploy(xxx)
      }
      }
      }
      

       I've added "when" everywhere to try to fix it, but it doesn't work. It's clearly using the condition since it doesn't run the deploy script. The error seems to be only in the GUI

      This code is in a shared library, I'm not sure if that could be the reason of the error.

       

          [JENKINS-50150] Parallel stage with when shown as ran, but it haven't

          Hi !

          I've got the same issue.

          When a step fails on a pipeline, the next steps are not ran, and the view on the blue ocean dashboard is ok, except for the steps in parallel : the display show them as ran with a green PASS status and "no steps" !!  

          It's really confusing. Enough to get remarks when doing a presentation. So this should be set with a higher priority.

          Olivier Renault added a comment - Hi ! I've got the same issue. When a step fails on a pipeline, the next steps are not ran, and the view on the blue ocean dashboard is ok, except for the steps in parallel : the display show them as ran with a green PASS status and "no steps" !!   It's really confusing. Enough to get remarks when doing a presentation. So this should be set with a higher priority.

          Ok, I've updated it to major.

          Leandro Narosky added a comment - Ok, I've updated it to major.

          Edward Marsh added a comment -

          Same issue for us too. Any news on this? 

          Edward Marsh added a comment - Same issue for us too. Any news on this? 

          Hi,
          I think I have a similar problem. With BlueOcean
          Because the second stage "2. end feature", has "when" condition -> false, so I get "this stage has no steps" 
          I can't choose my second input waiting. Just one is available.
          No problem with classic Jenkins, 2 inputs are displayed.

          Someone, could help me?

          My pipeline 

          pipeline {
            agent none
            options {
              timeout(time: 5, unit: 'MINUTES')
            } 
            stages {
              stage('Gitflow') {
                parallel {
                  // DEVELOP BRANCH
                  stage('1. start new feature') {
                    agent { label 'master'}
                    when {
                      beforeOptions true            
                      branch 'develop'
                    }
                    input {
                      message "Start a new feature, give me the name?"
                      ok "Submit"
                      parameters {
                        string(defaultValue: 'XXXX', name: 'FEATURE_NAME', trim: true)
                      }
                    }  
                    options {
                      timeout(time: 1, unit: 'MINUTES')
                    }
                    steps {
                      echo "Create a pre-release branch"        
                    }
                  }
                  // FEATURE BRANCH
                  stage('2. end feature') {
                    agent { label 'master'}
                    when {
                      beforeOptions true            
                      branch pattern: ".*feature/.*", comparator: "REGEXP"
                    }      
                    steps {
                      echo "This is a feature branch, end of feature, merge to develop"        
                    }
                  }
                  // DEVELOP BRANCH
                  stage('3. start pre-release') {
                    agent { label 'master'}
                    when {
                      beforeOptions true            
                      branch 'develop'
                    }
                    input {
                      message "Start a pre-release?"
                      ok "Proceed"            
                    }
                    options {
                      timeout(time: 1, unit: 'MINUTES')
                    }
                    steps {
                      echo "Create a pre-release branch"        
                    }
                  }       
                }
              }
            }
          }
          

          Chantereau Olivier added a comment - Hi, I think I have a similar problem. With BlueOcean Because the second stage "2. end feature", has "when" condition -> false, so I get "this stage has no steps"  I can't choose my second input waiting. Just one is available. No problem with classic Jenkins, 2 inputs are displayed. Someone, could help me? My pipeline  pipeline {   agent none   options {     timeout(time: 5, unit: 'MINUTES' )   }    stages {     stage( 'Gitflow' ) {       parallel {         // DEVELOP BRANCH         stage( '1. start new feature' ) {           agent { label 'master' }           when {             beforeOptions true                         branch 'develop'           }           input {             message "Start a new feature, give me the name?"             ok "Submit"             parameters {               string(defaultValue: 'XXXX' , name: 'FEATURE_NAME' , trim: true )             }           }             options {             timeout(time: 1, unit: 'MINUTES' )           }           steps {             echo "Create a pre-release branch"                   }         }         // FEATURE BRANCH         stage( '2. end feature' ) {           agent { label 'master' }           when {             beforeOptions true                         branch pattern: ".*feature/.*" , comparator: "REGEXP"           }                 steps {             echo "This is a feature branch, end of feature, merge to develop"                   }         }         // DEVELOP BRANCH         stage( '3. start pre-release' ) {           agent { label 'master' }           when {             beforeOptions true                         branch 'develop'           }           input {             message "Start a pre-release?"             ok "Proceed"                       }           options {             timeout(time: 1, unit: 'MINUTES' )           }           steps {             echo "Create a pre-release branch"                   }         }              }     }   } }

            Unassigned Unassigned
            leoxs22 Leandro Narosky
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: