Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

is it possible to dynamically create parallel steps?

Bill Lazar March 31, 2023

As we add new (unit and Cypress) tests to our repo, the the PR build time grows. We've tried manually splitting them into multiple steps but this doesn't scale. 

We tried using https://github.com/bahmutov/cypress-split but saw no change in run times.

Most recently we manually created parallel steps for Cypress steps but as mentioned this won't scale as our app grows.

Is it possible to dynamically create steps in a pipeline?

1 answer

1 accepted

0 votes
Answer accepted
Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 2, 2023

Hi @Bill Lazar,

Thank you for reaching out to the community.

Unfortunately, it is not possible to create dynamic steps in Bitbucket Cloud Pipelines.
However, you can try to programmatically update your bitbucket-pipelines.yml file by editing the file adding steps and pushing it to your repository using the below API endpoint.

POST /2.0/repositories/{workspace}/{repo_slug}/src

API Reference here

Hope it helps and do let me know if you have further questions.

Regards,
Mark C

Bill Lazar April 3, 2023

Doesn't really help but thank for the answer.

aserece April 28, 2023

It does help, bit it needs more development of your own. You have to run a pre-push script that updates the "parallel" section inside pipelines.yml based on your existing tests and use cases. Then you push that change with this endpoint

Bill Lazar May 4, 2023

Thanks but I'm not going to do that.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events