Forums

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

Can parallel steps finish before failing with bitbucket pipelines parallel runs?

Drew Gallagher February 10, 2023

For example I have a deploy step and a test step in my pipeline.

If I run them in parallel and a test fails, but deploy finishes faster, will the deploy already be done even though the tests failed? 

Or do the changes in that step revert? 

My goal is to run test and deploy in parallel so if they do succeed it is much faster, but if they fail then deploy doesn't actually deploy broken code. 

Not sure if this is possible. 

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 14, 2023

Hi Drew!

If I run them in parallel and a test fails, but deploy finishes faster, will the deploy already be done even though the tests failed?

Yes, the deploy will already be done and the changes will not be reverted.

There is an option fail-fast: true for parallel steps (see the doc here), that will make the whole parallel group stop if a step fails. However, I don't think this will be useful for your use case because if the deploy finishes faster the changes will not be reverted in this case either.

If you don't want to deploy broken code, then the deploy step shouldn't be in the parallel set of test, so that if the test fails the build stops and the deploy doesn't happen.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events