Skip to content

Ability to limit protected environments to specific tags and branches

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Release notes

Problem to solve

It is possible to protect environments and protect branches, but it is not possible to restrict deployments of an environment to specific branches. This means that a maintainer can accidentally (or on purpose) deploy changes to a protected environment from within a merge request.

This would also be a more generic alternative to building an analogous feature into the GitLab agent's CI/CD tunnel (see gitlab-org/cluster-integration/gitlab-agent#229 (closed)).

Proposal

In the settings for a protected environment, add two distinct settings:

  • Branch selection: Wildcard pattern and whether the matching branch must be protected
  • Tag selection: Wildcard pattern and whether the matching tag must be protected

Intended users

Feature Usage Metrics

This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.

Edited by 🤖 GitLab Bot 🤖