added --platform switch to pull, tag and push in push-latest job

This commit is contained in:
Micha Gläß-Stöcker 2020-09-12 21:27:28 +02:00
parent 9820641a36
commit 1d75f246c3

View file

@ -55,11 +55,11 @@ Push latest:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - 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 # 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 # that built the image in the previous step, we pull it again locally
- docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME - docker pull --platform linux/amd64,linux/arm64,linux/arm/v7 $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
# Then we tag it "latest" # Then we tag it "latest"
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME $CI_REGISTRY_IMAGE:latest - docker tag --platform linux/amd64,linux/arm64,linux/arm/v7 $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME $CI_REGISTRY_IMAGE:latest
# Annnd we push it. # Annnd we push it.
- docker push $CI_REGISTRY_IMAGE:latest - docker push --platform linux/amd64,linux/arm64,linux/arm/v7 $CI_REGISTRY_IMAGE:latest
# Finally, the goal here is to Docker tag any Git tag # Finally, the goal here is to Docker tag any Git tag
# GitLab will start a new pipeline everytime a Git tag is created, which is pretty awesome # GitLab will start a new pipeline everytime a Git tag is created, which is pretty awesome