How to add approval rules to a project
This guide shows you how to add approval rules to a project
- Create a new branch with a name like
add-approvalrules-to-project - Edit the
.yamlfile of the project in which you want to add the approval rules - Add the approval rules you want to add to
spec.approvalRules. For example
approvalRules:
- name: Approval rule
appliesToAllProtectedBranches: true
approvalsRequired: 2
groupIds: []
protectedBranchIds: []
ruleType: regular
usernames:
- test.userℹ️ For more information about the approval rule resource, please take a look at the GitlabApprovalRule resource
- Create a merge request
- Wait for the dry run to finish and check if the changelist contains the expected changes

- After making sure the changes are correct, have someone check and approve your merge request and start the deployment by clicking on the play button of the deploy job

- When the deploy job has finished successfully, the merge request will automatically be merged.