Gitlab-Registry-Cleaner icon indicating copy to clipboard operation
Gitlab-Registry-Cleaner copied to clipboard

Stops after 90 Tag deletions on gitlab.com

Open actraiser opened this issue 3 years ago • 3 comments

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

actraiser avatar Jan 17 '21 21:01 actraiser