This topic collects helpful resources for storage management automation, including scripts, articles, forum topics, and more.
Documentation
- Manage your Storage Usage
- Storage Management Automation with practical examples for the GitLab CLI and the
python-gitlab
API library. - REST API, third-party API clients
- GitLab CLI,
glab api
command.
Forum topics
- Remove all artifacts with discussion and scripts linked.
Blog posts and articles
- Article: Cleaning up GitLab Build Artifacts
- Stack Overflow topic: Clean up history in GitLab Pipeline
Scripts and Snippets
WARNING
Scripts may delete storage which cannot be reverted. Use with care in a test project/group before running on your production environment and namespaces. Also, open the source code and review the executed steps.
- GitLab Storage Cleanup by @thelabnyc
- GitLab Artifact Cleanup by @JonathonReinhart
- GitLab Storage Analyzer, unofficial project by the GitLab Developer Evangelism team
Ideas
Please share helpful resources as a comment to this topic.
For specific questions on programming, tools usage, problems, etc. create new topic in the How to Use GitLab category and add matching tags.
You can see a few tags on this forum topic already. For example, when the API is involved, add the api tag to your new topic. Thanks!