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 ?
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
Appreciate I'm resurrecting a very old thread here but I have this exact same issue. Is there a way we can have one single yaml file in a repo which every branch references? Currently when we need to make a change to a step, that change much be done in a branch and then every other branch must merge it in, in order to run the latest version of the pipeline.
Ideally I just want one bitbucket-pipelines.yml file which every branch can see and run, without running their own local copy.
(Note this is just one single repo in one workspace)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.