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

FlowNode.isRunning is not very useful

XMLWordPrintable

      Give following pipeline script, b1 branch finishes immediately and b2 is not completed yet (waiting for input). I determine branch's completion from a branch's end FlowNode and calling FlowNode.isRunning() returns true instead false as its already completed. This makes BlueOcean API returns b1 as running whereas its already been completed.

      node {
          stage("hey") {
              echo "hello from hey"
          }
          
          stage("par") {
              parallel (
                  "b1" : {
                      echo 'hello from b1'
                  },
      
                  "b2" : {
                      def branchInput = input message: 'Please input branch to test against', parameters: [[$class: 'StringParameterDefinition', defaultValue: 'master', description: '', name: 'branch']]
                      echo "BRANCH NAME: ${branchInput}"
                  }             
              )            
          }
             
          stage("ho") {
              echo "hello from ho"
          }
          
      }
      

            jglick Jesse Glick
            vivek Vivek Pandey
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: