Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,368,866
Community Members
 
Community Events
168
Community Groups

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

Atlassian Community Events