Open bittner opened 1 year ago
This will happen if you're using the GitLab documentation as written, with IMAGE: $CI_PROJECT_PATH
(which is <namespace>/<project>
, and not actually correct). Reg resolves this properly, but it should be IMAGE: $CI_REGISTRY_IMAGE
(or whatever the image name is, including the $CI_REGISTRY
domain), which is the complete name of the repository.
With that, the reg output is as expected:
$ reg rm -d --auth-url "$CI_REGISTRY" -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY_IMAGE/tmp:$CI_PIPELINE_ID"
time="2023-12-26T18:19:36Z" level=info msg="domain: registry.gitlab.com"
time="2023-12-26T18:19:36Z" level=info msg="server address: registry.gitlab.com"
2023/12/26 18:19:36 registry.ping url=https://registry.gitlab.com/v2/
2023/12/26 18:19:36 registry.manifests.get url=https://registry.gitlab.com/v2/gitlab-ci-utils/curl-jq/tmp/manifests/1119548976 repository=gitlab-ci-utils/curl-jq/tmp ref=1119548976
2023/12/26 18:19:37 registry.manifests.delete url=https://registry.gitlab.com/v2/gitlab-ci-utils/curl-jq/tmp/manifests/sha256:559385d098c393708b4417c58e7905fd91bbb6bc69437ce2d7905d46a55d6578 repository=gitlab-ci-utils/curl-jq/tmp digest=sha256:559385d098c393708b4417c58e7905fd91bbb6bc69437ce2d7905d46a55d6578
Deleted registry.gitlab.com/gitlab-ci-utils/curl-jq/tmp:1119548976@sha256:559385d098c393708b4417c58e7905fd91bbb6bc69437ce2d7905d46a55d6578
GitLab doesn't have its own way to delete container images from their registry. Their documentation suggests to use
reg rm
to tackle the problem.When I run the suggested setup the output states "Deleted docker.io/...", which is a bit irritating.
I understand that the output states "server address: registry.gitlab.com" in line two. But this is easily overlooked.
Shouldn't the last line of the output use the actual registry server address?