Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Different bitbucket-pipelines.yml files on different branches

Edited

Hi,

If we have a bitbucket-pipelines.yml file on main branch and some one modifies this file and pushes it to the develop branch, which file would then be executed actually ?

Basically, if we have different conflicting versions of pipelines file on different branches, which one gets executed ?

1 answer

0 votes
Mark C Atlassian Team Oct 18, 2021

Hi @Salman Azmat

Welcome to the community.

The YAML (bitbucket-pipelines.yml) configuration for Pipelines is based on branches and it will depend on your YAML triggers.
Initially, once you enabled Pipelines, a YAML file will be added to your main branch.
Once you created a new branch (e.g. develop) from the main branch and pushed a commit to the develop branch, Pipelines will run your YAML file from the develop branch.

Now, Pipelines triggers will vary depending on your YAML trigger configuration.

You can check out this documentation to know more about different ways to trigger a Pipelines build.

In conclusion, if you have different versions of your code for different branches, you will need to maintain your YAML file per branch.

Feel free to let me know if you have further questions that I can help with.

Regards,
Mark C

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

4,423 views 12 15
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you