Search code examples
gitlabgitlab-cigitlab-ci-runner

Gitlab CI / Gitlab Runner - Which version of gitlab-ci.yml is used?


Which version of .gitlab-ci.yml is actually been taken when running CI-Jobs in a MergeRequest?

Is it the version provided in the

  • source-branch,
  • target-branch,
  • or master?

Solution

  • The runner checks out the source-branch!

    If the branch does not contain all commits of the master branch it is marked as 'detached'. In that case it is advisable to rebase the branch to the master. Otherwise a red state may occur at merge time.

    There are more enhanced checkout/merge/test strategies called Merge Trains, but that is another topic.