I need to define a declarative pipeline with multiple levels of parallel stages as such:

1   Prebuild_action1
2   Prebuild_action2
3.1 Build platform_1
4.1   Test1 platform_1
4.2   Test2 platform_1
4.3   Test3 platform_1
3.2 Build platform_2
3.3 Build platform_3
3.4 Build platform_4

First, 1 should run, then 2 should run, then all of 3.x should run in parallel and when 3.1 is done all 4.x should run in parallel.

It doesn't seem possible for two reasons: 1. There doesn't seem to be any way to have both a stage and a group of parallel stages within a parent stage and it seems that parallel blocks can only be defined at top-level stages so I can't have a parallel block for 3.x and 4.x.

Is there some way to do that I am just not seeing at the moment?


1 Answer 1


Sure it's possible to have nested parallel stages and it works just fine (I've done it before), but the visualization in the web UI is terrible, even with Blue Ocean. There was even an official blog post when this feature was added.

This question has already been asked a couple other times on this site as well, you might be interested in these questions and answers:

It's not entirely clear to me from the wording of your question if it's a duplicate of those questions or if there are significant differences, so I haven't flagged your question as a duplicate.

  • 4
    Hi. Thanks for your answer. Frankly I couldn't care less about the Blue Ocean view. JENKINS-39203 has made Blue Ocean pretty useless. As for the potential duplicates, the first one is not. The answer there is a scripted pipeline. I specifically asked about declarative. Second potential duplicate's highest rated answer just refers to "Use nested parallel statements. (Thanks @lawnmowerlatte)" which is not really an answer along with a note about BO visualisation which I don't care about. The second answer there is not really clear to me how/that he's really nesting parallel stages.
    – Brian
    Mar 15, 2019 at 14:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.