issue trying to push to gitlab ci registry
Closed this issue · 1 comments
Gasperan commented
hi, I tried to use the build job and it is failing in this part:
- docker pull $GITLAB_IMAGE || true # Allows us to use --cache-from
- docker build --cache-from $GITLAB_IMAGE -t $GITLAB_IMAGE:$CI_COMMIT_SHA .
- docker push $GITLAB_IMAGE
if you build the image using the $CI_COMMIT_SHA value as tag, then you should push using same tag, otherwise you are going to receive the error:
tag does not exist: [docker image]:latest
I'm suggesting add the following in push command in gitlab-ci.yml file:
- docker push $GITLAB_IMAGE:$CI_COMMIT_SHA
I tried to create a branch to do a pull request but I don't have enough permissions.
JanMikes commented
Hi, thank you for letting me know. Referred to this build (2 years ago) it worked, so it feels weird to me, but maybe just something changed :-)