Skip to main content

Gitlab registry async cleaner

Project description

gitlab_registry_cleaner

A project can remove tags from the gitlab registry by configuration file.

Supported time:

  1. days
  2. hours
  3. minutes

Environments:

  1. GITLAB_TOKEN - personal gitlab token. Override from CLI -t or --token.
  2. GITLAB_URL - general gitlab domain, https://gitlab.com for example. Override from CLI --url.
  3. REPOSITORY_CONFIG_PATH - path to json config file. Override from CLI -c or --config.
  4. SSL_PATH - path to SSL certificate. Override from CLI --ssl_path.
  5. 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

gitlab_registry_async_cleaner-1.0.6.tar.gz (13.5 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file gitlab_registry_async_cleaner-1.0.6.tar.gz.

File metadata

File hashes

Hashes for gitlab_registry_async_cleaner-1.0.6.tar.gz
Algorithm Hash digest
SHA256 906086a04e0faa4e4e8e316218a61d173f9b06fc3504b26e1c69c6b447c3670f
MD5 c9db9a451ea09dd9b237f6453a46f8d0
BLAKE2b-256 c02eff2c75ac46da03a12225b8d8661dac2fd76679ea013d35efe9088c3a72c4

See more details on using hashes here.

File details

Details for the file gitlab_registry_async_cleaner-1.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for gitlab_registry_async_cleaner-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 aff94f09517c93784b04c115201c1662949663172d2b7d9bd57c898f4d8b21e9
MD5 29d7319e76c952088ba8d51f5d52e411
BLAKE2b-256 b385b877969ec9872fc1279c54199ae5d2580003bf4b2bb9d894b1843fc77e32

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page