-
Bug
-
Resolution: Unresolved
-
Critical
-
None
-
Jenkins 2.361, blueocean 1.25.6
Hello, I'm trying to dynamically generate stages in a declarative pipeline and execute them parallelly. This works up to the point where one such "stage" actually consists of multiple stages which should be run sequentially.
The following simplified code shows the problem:
def generateStage(String name) { return { node { echo "STAGE ${name}" } } } def generateStages(String name) { return { node { stage("A") { echo "STAGE ${name} / STAGE A" } stage("B") { echo "STAGE ${name} / STAGE B" } } } } pipeline { agent any stages { stage("Stages") { steps { script { parallel([ "ONE": generateStage("ONE"), "TWO": generateStages("TWO") ]) } } } } }
This pipeline gets visualized as shown in the attached picture (Pipeline.png). In the console output I can see that the "STAGE TWO / STAGE B" echo is there but stage B doesn't appear in the Blue Ocean UI.
When using the functions in a scripted pipeline the visualization is correct (just parallel(...) instead of pipeline ...). So is that a bug, a missing feature or am I doing something wrong? Thanks in advance.