To restrict GitLab's pipelines only for master branch

Viewed 618

We are running a private project in GitLab instance (version 14.6) free edition.

Our scenario is like this ->

  1. For each network engineer we will create a branch and we will give it to them. All engineers will be given the "Developer" role.
  2. An administrator account will have access to the "master" branch.
  3. No "Developer" user should push/merge in the master branch. They just can create a merge request.
  4. In the master branch, the usual git-ci yml file will be edited obviously by only administrators. Also, the pipelines for master branch commits will only be executed by admins.
  5. The master branch's git-ci yml file will obviously be present in other branches too. But when edited by "Developers" in those branches, those shouldn't be created as pipelines. In fact, it should be - CI/CD -> pipelines -> Only the pipelines for master branch commits should exist here

Can someone please suggest the settings template for the above guidelines?

1 Answers
Related