Repair prod docker build pipe cache reference

Aswell as another attempt at pushing multiple tags
This commit is contained in:
Zedifus 2022-10-23 20:24:38 +01:00
parent c3c8bc178c
commit 8c4c8ba995

View File

@ -92,16 +92,15 @@ docker-build-prod:
- docker context create tls-environment - docker context create tls-environment
- docker buildx create --name zedBuilder --use tls-environment - docker buildx create --name zedBuilder --use tls-environment
- docker buildx build - docker buildx build
--cache-from type=registry,ref="$CI_REGISTRY_IMAGE" --cache-from type=registry,ref="$CI_REGISTRY_IMAGE:latest"
--build-arg BUILDKIT_INLINE_CACHE=1 --build-arg BUILDKIT_INLINE_CACHE=1
--build-arg "BUILD_DATE=$(date +"%Y-%m-%dT%H:%M:%SZ")" --build-arg "BUILD_DATE=$(date +"%Y-%m-%dT%H:%M:%SZ")"
--build-arg "BUILD_REF=${CI_COMMIT_SHA}" --build-arg "BUILD_REF=${CI_COMMIT_SHA}"
--build-arg "CRAFTY_VER=${VERSION}" --build-arg "CRAFTY_VER=${VERSION}"
--tag "crafty_build" --tag "$CI_REGISTRY_IMAGE:$VERSION"
--platform linux/arm64/v8,linux/amd64 . --tag "$CI_REGISTRY_IMAGE:latest"
- docker tag crafty_build:latest $CI_REGISTRY_IMAGE:latest --platform linux/arm64/v8,linux/amd64
- docker tag crafty_build:latest $CI_REGISTRY_IMAGE:$VERSION --push .
- docker push -a
after_script: after_script:
- | - |
docker buildx rm zedBuilder && echo "Successfully Stopped builder instance" || echo "Failed to stop builder instance." docker buildx rm zedBuilder && echo "Successfully Stopped builder instance" || echo "Failed to stop builder instance."