Protected containers: Add basic model and migrations
requested to merge gitlab-community/gitlab:424367-protected-containers-add-basic-model-and-migration-for-protecting-container into master
What does this MR do and why?
- This MR is related to issue Protected containers: Add basic model and migra... (#424367 - closed).
- This MR introduces the basic backend components for protecting containers, e.g. database migration, model, etc.
- The scope of the basic functionality was discussed in the epic: &9825
- This MR intends to follow the implementation the MR for the feature "protected packages", see Protected packages: Add model and migration for... (!124776 - merged)
Screenshots or screen recordings
No visuals to show. This MR contains mostly backend -related code, see the next section
How to set up and validate locally
rails db:migrate
- Open the rails console (
rails c
) and start playing around with the new model
ContainerRegistry::Protection::Rule.create!(
project: Project.find_by_full_path("flightjs/Flight"),
container_path_pattern: "flightjs/flight/*",
push_protected_up_to_access_level: Gitlab::Access::OWNER
)
Todos
-
Rename factory for container registry protecftion rule
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR. -
Changelog entry added, if necessary -
Documentation created/updated via this MR -
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Tested in all supported browsers -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the javascript style guides -
Conforms to the database guides
-
Related to #424367 (closed)
Edited by Gerardo Navarro