Gitlab-Registry-Cleaner
Gitlab-Registry-Cleaner copied to clipboard
Stops after 90 Tag deletions on gitlab.com
First of all about the note in the README.md: This script uses v4 of the GitLab API. It is tested against a self-hosted GitLab instance and it is unknown if these same commands work on projects hosted on gitlab.com.
I can confirm, script works mostly fine on commercial gitlab.com. I just ran it to clean up 1200 old tags but noticed that it stops after 90 deletions with the success message "Cleanup Complete. Please run ...etc". But it also shows a warning at the beginning of the cleanup process: ./clean-registry.sh: line 118: [: x-next-page:2: integer expression expected
When I re-run the script it just continues to delete the next 90 tags before it stops again. I can only assume that it has something to do with how gitlab.com responses to the page requests as opposed to self-hosted gitlab.
Anyway, the script is a life saver - thank you so much!
Greets -act