i think we need to login to pull and push from and to our private registry

This commit is contained in:
Micha Gläß-Stöcker 2020-09-12 21:12:22 +02:00
parent 8d462cf78b
commit 9820641a36

View file

@ -52,6 +52,7 @@ Push latest:
# Only "main" should be tagged "latest"
- main
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
# Because we have no guarantee that this job will be picked up by the same runner
# that built the image in the previous step, we pull it again locally
- docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
@ -71,6 +72,7 @@ Push tag:
# We want this job to be run on tags only.
- tags
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME