0
votes

I have a .gitlab-ci.yml in my master branch, It works fine everytime I push to master the CI pipeline runs. What I want to know is if I have this file on master branch will it trigger the pipeline when other branches are pushed ? or do I need to create this file on every single branch? I'm not using "only" "when" or "except"on my .gitlab-ci.yml file.

1

1 Answers

0
votes

The .gitlab-ci.yml file has to be on every branch on which you want to trigger the pipeline.

Normally you would create the file on master and then branch out as necessary.

If I'm not mistaken you want to add the pipeline on already created branches. Should this be the case you have to add the definition files on the branches too. The best would be to do this using the gitfeatures rebase and cherry-pick