Skip to content

Protected containers: Badge "protected" in container detail page

  • 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?

  • Add badge "protected" in the detail page of the container repository to indicate if there is a container protection rule for the given container repository
  • This feature and changes were motivated and identical to a previous MR (related to protected packages), see !146206 (merged)
  • Considering feature flag container_registry_protected_containers to enable / disable the badge "protected"

🛠 with at Siemens

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

MR Checklist (@gerardo-navarro)

Screenshots or screen recordings

With this MR, we add the badge "protected".

Before After
grafik grafik

How to set up and validate locally

  1. Push a container image to a container respository path
  2. Go to the container repository overview page: http://gdk.test:3000/flightjs/Flight/container_registry
  3. Select one container repository und go to its detail page: http://gdk.test:3000/flightjs/Flight/container_registry/1
  4. On the detail page, you should not see the badge "protected" (below the name of the container repository)
  5. Go to the project settings and protect the container repository (that you have visited before): http://gdk.test:3000/flightjs/Flight/-/settings/packages_and_registries
  6. Reload the detail page of the container repository: http://gdk.test:3000/flightjs/Flight/container_registry/1
  7. On the detail page, you should see the badge "protected".

Related to #441346

Edited by Gerardo Navarro

Merge request reports