Gitlab registry async cleaner
Project description
gitlab_registry_cleaner
A project can remove tags from the gitlab registry by configuration file.
Supported time:
- days
- hours
- minutes
Environments:
- GITLAB_TOKEN - personal gitlab token. Override from CLI -t or --token.
- GITLAB_URL - general gitlab domain, https://gitlab.com for example. Override from CLI --url.
- REPOSITORY_CONFIG_PATH - path to json config file. Override from CLI -c or --config.
- SSL_PATH - path to SSL certificate. Override from CLI --ssl_path.
- TIMEOUT - timeout to all HTTP requests. Override from CLI --timeout.
Also, you can set --dry-run flag from CLI. In this mode found tags not be deleted.
Install
pip install gitlab_registry_async_cleaner
Usage
gitlab_async_cleaner
You can create an .env file in your startup directory or set environment variables any way you like. The CLI takes precedence and arguments passed through the CLI will change the environment variables.
JSON config example
{
"gitlab_project_1":
{
"id": 1,
"delete_older_than": {
"days": 2
}
},
"gitlab_project_2":
{
"id": 2,
"delete_older_than": {
"hours": 5
}
},
"gitlab_project_3":
{
"id": 3,
"delete_older_than": {
"minutes": 60
}
}
}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file gitlab_registry_async_cleaner-1.0.6.tar.gz
.
File metadata
- Download URL: gitlab_registry_async_cleaner-1.0.6.tar.gz
- Upload date:
- Size: 13.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/6.5.0-44-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 906086a04e0faa4e4e8e316218a61d173f9b06fc3504b26e1c69c6b447c3670f |
|
MD5 | c9db9a451ea09dd9b237f6453a46f8d0 |
|
BLAKE2b-256 | c02eff2c75ac46da03a12225b8d8661dac2fd76679ea013d35efe9088c3a72c4 |
File details
Details for the file gitlab_registry_async_cleaner-1.0.6-py3-none-any.whl
.
File metadata
- Download URL: gitlab_registry_async_cleaner-1.0.6-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/6.5.0-44-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aff94f09517c93784b04c115201c1662949663172d2b7d9bd57c898f4d8b21e9 |
|
MD5 | 29d7319e76c952088ba8d51f5d52e411 |
|
BLAKE2b-256 | b385b877969ec9872fc1279c54199ae5d2580003bf4b2bb9d894b1843fc77e32 |