Skip to content

Allow the restriction of Kubernetes agent access to protected branches

  • Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA

What does this MR do and why?

This MR allows the restriction of Kubernetes agent access to protected branches, see gitlab-org/gitlab#467936 (closed).

This MR adds the option to set a protected_branches_only flag in the ci_access.yml for projects and groups.

ci_access:
  project:
    - id: example/example
      protected_branches_only: true 
      environments:
        - dev
  groups:
    - id: example/example
      protected_branches_only: true 
      environments:
        - dev

It's similar to !793 (merged), which adds configuration options to limit the agent to specific environments.

🛠 with at Siemens

Edited by Nicholas Wittstruck

Merge request reports

Loading