Having a different CI pipeline depending on the branch

Hello,

I would like to have a different pipeline depending on the branch that I’m working on.

Actually it seems that only the gitlab-ci.yml file in the master branch is used to process every branches.

In my case I’m working on a project with a protected master branch.
While working on CI / CD improvement, it seems a bit complicated to perform a merge request on each change (especially if I wait for one of my teammates to review my changes …)

1 Like

Hello,

You can use the parameters only and except

look at this:

only-and-except-simplified

2 Likes

The link to only-and-except-simplified seems to be stale.

According to CI/CD YAML syntax reference | GitLab :

only and except are not being actively developed. rules is the preferred keyword to control when to add jobs to pipelines.