Search code examples
gitlabgitlab-cigitlab-ci-runner

Multiple versions of .gitlab-ci.yml in multiple branches


If different branches in the repository have different .gitlab-ci.yml, then which would would be considered by the gitlab CI?


Solution

  • It is dependent on which branch you are pushing to (and how your gitlab-ci.yml file is setup.

    For example:

    • When you are on a branch (say develop), and you push to develop, GitLab would build develop's gitlab-ci.yml file.
    • If you are on another branch (say feature), and you push to feature, GitLab would build feature's gitlab-ci.yml file.