Skip to content

Remove branch-related images from the registry when the branch is merged

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

Problem to solve

The GitLab Container Registry allows you to build, publish and pull Docker images using the command line or GitLab pipelines. However, many images that are built today are for a specific branch, which is not useful once the branch has been merged.

Intended users

Personas are described at https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/ -->

Further details

Goals

  • Developers have an easy option for removing branch images that are not useful to keep around.

Proposal

  • Add a checkbox to the MR screen that will allow users to "delete all branch images upon merge"

Examples

  • MR screen to add 'Delete branch images when merge requested is accepted` Screen_Shot_2019-10-10_at_4.54.06_PM

Permissions and Security

  • Developers and above can choose to remove images on merge

Documentation

Testing

What does success look like, and how can we measure that?

  • Success looks like we can help our customers and ourselves lower the cost of storage for the Container Registry.
  • We can measure this for gitlab.com (once we can run garbage collection) by looking at the overall cost of storage.
  • We can also measure the total number of images over time and we should see a significant decrease in that number and then see it level off over time.
Edited by 🤖 GitLab Bot 🤖