-
Bug
-
Resolution: Unresolved
-
Minor
-
Jenkins 2.57
BlueOcean 1.0.1
-
-
Blue Ocean 1.1
Problem
There appears to be a mismatch between what the Blue Ocean API returns that causes the UI to become disoriented and hide information when dealing with a specific scenario given this pipeline configuration.
Jenkinsfile
def envs = [ [env: "stage", region: "us-east-1"] ] stage("Plan") { def planJobs = [:] for(int i = 0; i < envs.size(); i++) { def details = envs.get(i) planJobs["${details.env}-${details.region}"] = { node() { echo "Running!" } } } parallel(planJobs) } stage("Apply") { def applyJobs = [:] for(int i = 0; i < envs.size(); i++) { def details = envs.get(i) def confirmedUser = "Auto" applyJobs["${details.env}-${details.region}"] = { def apply = false try { confirmedUser = input message: 'Apply Plan?', ok: 'Apply', submitterParameter: 'confirmedUser' apply = true } catch (err) { apply = false currentBuild.result = 'ABORTED' } if(apply) { node() { echo "Applying! Confirmed by ${confirmedUser}" } } } } parallel(applyJobs) }
Background
We dynamically generate the parallel stages based on information passed into the pipeline (or read from a config file). This way we can run for a project-defined set of params, i.e "run this in stage and prod in the us-east and eu-central regions" or any mix/match of those kinds of parameters.
singles.json: A parallel job that has two sequential stages with an input in between (Plan - input - Apply)
doubles.json: A parallel job that has two jobs running the same two sequential stages with only one waiting on input:
You can see in the image with the single "Apply" stage, it is missing the plan view (the singles.json file is the API response for that view)
The second screenshot shows what we expect to see in the single job (without the "prod-us-east-1" node).
plukevdh thank you for reporting this. Could I please have a Jenkinsfile that reproduces the problem? The one provided in the gist doesn't execute cleanly without me modifying it. I actually tried modifying it and got some script security errors - it would be great if we could get an example that does not violate the sandbox.