I’m having trouble with gitlab CICD deleting docker images from my repository “invalid checksum digest format” which makes me think I’m pointing to a tag that doesn’t exist… but I’m not sure what to change to get it correct.
Here’s the code for the step that deletes the tag
stop review:
stage: deploy review
image: curlimages/curl:7.86.0
only:
- merge_requests
except:
- main
variables:
GIT_STRATEGY: none
IMAGE_TAG: $CI_PROJECT_PATH/data-loader:$CI_COMMIT_REF_SLUG
REG_SHA256: ade837fc5224acd8c34732bf54a94f579b47851cc6a7fd5899a98386b782e228
REG_VERSION: 0.16.1
before_script:
- curl --fail --show-error --location “https://github.com/genuinetools/reg/releases/download/v$REG_VERSION/reg-linux-amd64” --output ./reg
- echo “$REG_SHA256 ./reg” | sha256sum -c -
- chmod a+x ./reg
script:
- echo “auth url >>> $CI_REGISTRY”
- echo “image tag >>> $IMAGE_TAG”
- echo “ci project path >>> $CI_PROJECT_PATH”
- ./reg rm -d --auth-url $CI_REGISTRY -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $IMAGE_TAGwhen: manual
environment:
name: review/$CI_COMMIT_REF_NAME
action: stop
Here’s what my repo looks like
And here’s what the error I get from the runner
$ echo "auth url >>> $CI_REGISTRY"
auth url >>> registry.gitlab.com
$ echo "image tag >>> $IMAGE_TAG"
image tag >>> day-one-kata/day-one-azure/data-loader:try9
$ echo "ci project path >>> $CI_PROJECT_PATH"
ci project path >>> day-one-kata/day-one-azure
$ ./reg rm -d --auth-url $CI_REGISTRY -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $IMAGE_TAG
time="2023-12-17T16:05:03Z" level=info msg="domain: docker.io"
time="2023-12-17T16:05:03Z" level=info msg="server address: registry.gitlab.com"
2023/12/17 16:05:03 registry.ping url=https://registry.gitlab.com/v2/
2023/12/17 16:05:03 registry.manifests.get url=https://registry.gitlab.com/v2/day-one-kata/day-one-azure/data-loader/manifests/try9 repository=day-one-kata/day-one-azure/data-loader ref=try9
invalid checksum digest format
Cleaning up project directory and file based variables 00:01
ERROR: Job failed: exit code 1