Forums

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

how does one run pull request steps in parallel?

Vincent Jong September 8, 2023 edited

So, we have in our bitbucket-pipelines yaml and want to run the 'default' PR rule with 2 steps in parallel. Like, using your doc example:

pipelines:
pull-requests:
'**':
- parallel:
steps:
- step: *testEndToEndInDev
- step: *testEndToEndInStg
custom:
e2e-wfw:
- step: *testEndToEndInWfw
e2e-dev:
- step: *testEndToEndInDev
e2e-stg:
- step: *testEndToEndInStg

 This doesn't work as my ide is showing an error really from steps not being in the schema:

Screenshot 2023-09-08 at 10.06.45 AM.png

Is this even possible? If so, what do I need to do?

1 answer

1 accepted

0 votes
Answer accepted
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 10, 2023

Hi Vincent,

As long as the testEndToEndInDev and testEndToEndInStg steps are being defined using YAML anchors so that they may be referenced with a * symbol, the code that you have provided should work. 

Have you tested the code within Bitbucket Pipelines by running a build? May I know what was the result? As long as there are no errors highlighted within the YML editor itself in the UI (disregarding your IDE), the code is considered to be syntactically correct.

Cheers!

- Ben (Bitbucket Cloud Support)

Vincent Jong September 19, 2023

From what I observed, the steps seem to run serially. The first rule runs to completion, then the second rule runs. Running the config above fails, but that's due to creating the reports dir which is something I would need to fix. But either way, perhaps that's how the parallel steps are supposed to run?

Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 20, 2023

Are you able to test these steps outside of a PR definition? For example, a custom pipeline and tell me if the behaviour is the same?

Vincent Jong September 21, 2023 edited

I don't know what happened before, but Redoing the config and running the branch against the PR ** rule, now looks like it's working as expected now... Thanks for the help! 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
atlassian, atlassian community, job interviews, interview tips, career advice, interview preparation, job search, interview experiences, hiring process, atlassian careers, community discussion, interview best practices

Interview Tips & Pet Peeves ✍️

Join the discussion on interview best practices and common pitfalls. Share your experiences and learn from others in the Atlassian Community.

Share you experiences!
AUG Leaders

Atlassian Community Events