Merge branch 'dev' into devops/strip-sem-meta

This commit is contained in:
Zedifus 2022-10-08 19:43:40 +01:00
commit d0dabc5888

View File

@ -85,22 +85,23 @@ docker-build-prod:
- echo $CI_BUILD_TOKEN | docker login -u "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY
script:
- |
tag=""
VERSION="${MAJOR}.${MINOR}.${SUB}"
- |
echo "Running on branch '$CI_COMMIT_BRANCH': tag = $tag"
echo "Running on branch '$CI_COMMIT_BRANCH'"
echo "Crafty Version: $VERSION"
- docker context create tls-environment
- docker buildx create --name zedBuilder --use tls-environment
- docker buildx build
--cache-from type=registry,ref="$CI_REGISTRY_IMAGE${tag}"
--cache-from type=registry,ref="$CI_REGISTRY_IMAGE"
--build-arg BUILDKIT_INLINE_CACHE=1
--build-arg "BUILD_DATE=$(date +"%Y-%m-%dT%H:%M:%SZ")"
--build-arg "BUILD_REF=${CI_COMMIT_SHA}"
--build-arg "CRAFTY_VER=${VERSION}"
--tag "$CI_REGISTRY_IMAGE${tag}"
--platform linux/arm64/v8,linux/amd64
--push .
--tag "crafty-build"
--platform linux/arm64/v8,linux/amd64 .
- docker image tag "crafty-build" "$CI_REGISTRY_IMAGE"
- docker image tag "crafty-build" "$CI_REGISTRY_IMAGE:${VERSION}"
- docker image push -a
after_script:
- |
docker buildx rm zedBuilder && echo "Successfully Stopped builder instance" || echo "Failed to stop builder instance."