-
Bug
-
Resolution: Unresolved
-
Minor
-
None
The repro is a simple jenkinsfile:
PROPS = [ 'a': true, 'b': false, 'c': true ] pipeline { agent none stages { stage('Main') { matrix { axes { axis { name 'APP' values 'a', 'b', 'c' } } stages { stage('first') { when { expression { return PROPS[APP] } } steps { echo APP } } } } } } }
It is executed correctly, as is indicated by the job output:
Running in Durability level: MAX_SURVIVABILITY [Pipeline] Start of Pipeline [Pipeline] stage (hide) [Pipeline] { (Main) [Pipeline] parallel [Pipeline] { (Branch: Matrix - APP = 'a') [Pipeline] { (Branch: Matrix - APP = 'b') [Pipeline] { (Branch: Matrix - APP = 'c') [Pipeline] stage [Pipeline] { (Matrix - APP = 'a') [Pipeline] stage [Pipeline] { (Matrix - APP = 'b') [Pipeline] stage [Pipeline] { (Matrix - APP = 'c') [Pipeline] withEnv [Pipeline] { [Pipeline] withEnv [Pipeline] { [Pipeline] withEnv [Pipeline] { [Pipeline] stage [Pipeline] { (first) [Pipeline] stage [Pipeline] { (first) [Pipeline] stage [Pipeline] { (first) Stage "first" skipped due to when conditional [Pipeline] } [Pipeline] // stage [Pipeline] } [Pipeline] echo a [Pipeline] } [Pipeline] echo c [Pipeline] } [Pipeline] // withEnv [Pipeline] } [Pipeline] // stage [Pipeline] // stage [Pipeline] } [Pipeline] } [Pipeline] // stage [Pipeline] } [Pipeline] // withEnv [Pipeline] // withEnv [Pipeline] } [Pipeline] } [Pipeline] // stage [Pipeline] // stage [Pipeline] } [Pipeline] } [Pipeline] // parallel [Pipeline] } [Pipeline] // stage [Pipeline] End of Pipeline Finished: SUCCESS
However, it is visualized incorrectly both in blue-ocean and standard pipeline view. Basically, both a and b branches are visualized as not-executed, a as skipped, b as not built. In reality, a was executed.
When we put there a random sleep before each parallel branch, the visualization is correct. This is a real problem with some of our pipelines, this is just a toy example how to demonstrate it.