I'm trying the Gitlab "CI/CD > Container Registry tag expiration policy" setting, and so far it's not deleting anything. We use semantic versioning (with a "v" prepended), and my goal is to automatically delete old "patch" releases:
- Keep all major & minor tags: vM.0.0 and vM.m.0.
- Delete all but a few recent tags matching vM.m.p (where p is not zero)
Given that I'm enabling this new setting on an old project, it's risky to find my answer by experimentation. Even on a new project, experimenting would take a lot of effort and calendar time. A dry-run or preview option would be really nice here, so I could try out the settings without fear of deleting important tags.
I tried the following "expire" regex: v[1-9][0-9]*[.][0-9][0-9]*[.][1-9][0-9]*. So far it hasn't had any effect. Which leaves me wondering:
- How often does this run? Do I just need to wait longer?
- Am I mis-understanding the way this setting works?
- Is my regex bad?
- What regex format is expected, even?
- A more complex example in the UI would be nice. https://gitlab.com/gitlab-org/gitlab/-/issues/214007#note_322637771 mentioned that, but was closed without addressing that point.
- Is there any way to see feedback on this cleanup, like maybe in the project activity log?
My current approach is to tweak this setting once a day, then check my tags list the next day to see if it had any effect.
I'd appreciate general advice for verifying/troubleshooting this setting, and/or specific suggestions for how to match my particular version scheme.
Here's a screenshot of my current settings:
