Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Nested steps inside a parallel step?

Anton Usov
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 19, 2020

It is possible to have nested steps inside a parallel step?

 

I want to have something like that:

pipelines:
  default:
- step: script: - ./integration-tests.sh --batch 1 - parallel: - step: script: - ./integration-tests.sh --batch 2 - step:
- step: script: - ./deploy.sh - step: script: - ./integration-tests.sh --batch 3

 

2 answers

1 accepted

2 votes
Answer accepted
Daniil Penkin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 19, 2020

Hello @Anton Usov,

Nested steps (a step inside of a step) are not allowed anywhere in the file, not just inside of parallel.

Basically, all steps can have just two levels: top-level sequentially executed steps and steps inside of parallel section, which are executed concurrently.

My guess is that your goal is to execute multiple steps sequentially within a parallel section. If so, unfortunately it is not possible in Pipelines at the moment. The only way to keep parallelism would be to prepare a Docker image that every nested step could run with, and then squash sequential steps into one.

Hope this helps. Let me know if you have any questions.

Cheers,
Daniil

Anton Usov
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 20, 2020

Thank you!
I actually expected an answer like that.

Cheers,
Anton

2 votes
alex_begame_nl July 23, 2021

@Anton Usov @ and what about 2 parallel sections that are run sequentially
its not nested but actually can postpone some parallel runs..
Something like this:

pipelines:
  default:
    - parallel:
        - step:
            script:
              - ./parallel1-before.sh
        - step:
script: - ./parallel2-before.sh
- parallel: - step: script: - ./parallel1-after.sh - step:
script: - ./parallel2-after.sh

 

fogomes
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 26, 2022

That's what I ended up doing.

Like Denise Skidmore likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events