Skip to content

gitlab-ci: Fix docker image ref after move to Kaniko

Emanuele Aina requested to merge wip/em/kaniko-fixup into master

After 5ef5bacf "Build the docker image with Kaniko" we started to upload images with the commit sha in the image name rather than using it as a tag ($CI_REGISTRY_IMAGE/runtime/$CI_COMMIT_SHA instead of $CI_REGISTRY_IMAGE/runtime:$CI_COMMIT_SHA).

This causes the tagging of the latest image on the main branch to fail with:

$ skopeo copy --src-creds "$AUTH" --dest-creds "$AUTH" docker://"${IMAGE}:${TAG_OLD}" docker://"${IMAGE}:${TAG_NEW}"
time="2023-02-24T08:07:27Z" level=fatal msg="Error initializing source
docker://registry.gitlab.apertis.org/infrastructure/qa-report-app/runtime:03b1892be15e4ed0743104b13dfa69f86e2b7c9a:
Error reading manifest 03b1892be15e4ed0743104b13dfa69f86e2b7c9a in
registry.gitlab.apertis.org/infrastructure/qa-report-app/runtime: manifest unknown: manifest unknown"
Edited by Emanuele Aina

Merge request reports