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

Inconsistent API data about parallel pipeline stage IDs

XMLWordPrintable

      I have a jenkins pipeline which contains parallel stages. When I invoke GET /job/:job-name/:run-id/wfapi/describe to get the stages I can't distinguish in any way which stages are the parallel ones and which is their parent stage. All I have is a list of stages with names, statuses and IDs. So I decided to use Blue Ocean's API blue/rest/organizations/jenkins/pipelines/:job-name/runs/run-id/nodes but it doesn't return the same IDs and same names for the parallel stages as the classic API. The parallel stages are declared like this in the Jenkinsfile:
      node {
      parallel 'one':

      { stage('1') \{ ... }

      }, 'two':

      { stage('2') \{ ... }

      }
      }
      So the classic API returns stages with names "1" and "2" and the BlueOcean API returns stages with names "one" and "two" and the IDs of the stages are different in the two APIs.

      So there doesn't seem to be a way to get the parallel stage names and IDs in BlueOcean and there is no way to get the parent-child relations for parallel stages in the classic API.

            Unassigned Unassigned
            alexvukov Alexander Vukov
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: