Optimize Auto Build stage for Auto DevOps so that Container Registry is used efficiently
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Problem to solve
The Auto Builb stage of Auto DevOps functionality is creating an image that is automatically pushed to the Container Registry.
Either way, the resulting Docker image is automatically pushed to the Container Registry and tagged with the commit SHA or tag.
Auto DevOps was recently enabled for design.gitlab.com in gitlab-org/gitlab-services/design.gitlab.com!1216 (merged).
Besides some side-effects that are still being investigated in gitlab-org/gitlab-services/design.gitlab.com#352 (closed) and gitlab-org/gitlab-services/design.gitlab.com#394 (closed), the container registry of the project a) contains numerous images from merge requests that have been merged and b) the master image contains more than 80 tagged images.
Intended users
- Delaney (Development Team Lead)
- Devon (DevOps Engineer)
- Sidney (Systems Administrator)
- Dana (Data Analyst)
Further details
In this example, each image size is about 50 MiB but can get worse for larger projects that contain bigger images in size. Also, in a much more active project, it will be easier to accumulate an excessive number of unused images. It seems also inefficient to store all the images that will probably never be used.
Proposal
Ideally, Auto DevOps could a) delete images from merged merge requests, b) keep only the latest image for master, and more.
TBD