
This updates the remote-registry-tag role to use container_registry_credentials[registry].type to specify quay or docker API types. This aligns this roles' behavior with ensure-quay-repo's behavior. Change-Id: I098dfbfd7d7a744ad6a66d9d8abc109b0fb6254a
3.0 KiB
Remove tags from registry
This role creates a generic interface for removing tags from a container registry. The OCI distribution API (implemented essentially all registries) does specify a tag deletion endpoint, but as at 2023-03 essentially no registries implement it. This means practically we must talk to the per-registry API directly to remove tags. The methods to delete tags are generally similar across registries, but differ slightly in endpoint names, etc.
This role can run in two modes; either removing a single specific tag, or it can run a cleanup process removing all tags that match a given prefix and have not been modified in a given amount of time.
For public registries this role should guess the API from the repository name. If you are running against a private registry, you will need to explicitly specify the API type and URL prefix to communicate to using arguments below.
Role Variables