Protected environments¶
Info
This section requires GitLab Premium (paid). (This is a GitLab's limitation, not GitLabForm's.)
This section purpose is to manage the project protected environments.
Key names here are just any labels, except if the key name is enforce and is set to true - then only the protected environments defined here will remain in the project, all other will be deleted.
The supported values are like documented in the protect environment endpoint of the Protected environments API, with the following changes:
userwith a username can be used instead ofuser_idwith a user id,groupwith a group name can be used instead ofgroup_idwith a group id.access_levelcan have a string from the valid access levels as a value instead of just a number,- using
approval_rulesmay work but this has not been tested yet,
Example:
projects_and_groups:
group_1/project_1:
protected_environments:
enforce: true
env_1: # name of the environment
deploy_access_levels: &example_anchor_to_reuse_this_cfg
- access_level: maintainer
- user: johndoe
- user_id: 1234
env_2: # name of the environment
deploy_access_levels: *example_anchor_to_reuse_this_cfg