From 90c2bc356910cb3138b6384813a739fab70574c5 Mon Sep 17 00:00:00 2001 From: PhilWindle Date: Wed, 13 Sep 2023 17:37:58 +0000 Subject: [PATCH] Build fixes --- build-system/scripts/build | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/build-system/scripts/build b/build-system/scripts/build index 97a58c8fa87..5b4dfb12126 100755 --- a/build-system/scripts/build +++ b/build-system/scripts/build @@ -67,9 +67,9 @@ echo "Content hash: $CONTENT_HASH" cd $BUILD_DIR -SINGLE_ARCH="false" +MULTI_ARCH="false" if [[ $PLATFORMS != "linux/amd64" ]]; then - SINGLE_ARCH="true" + MULTI_ARCH="true" retry ensure_docker_buildx echo "Creating multi-platform builder" docker buildx create --name multi-platform-builder --bootstrap --use @@ -175,8 +175,7 @@ for STAGE in $STAGES; do echo "Building stage: $STAGE" STAGE_IMAGE_COMMIT_URI=$ECR_URL/$REPOSITORY:cache-$CONTENT_HASH-$STAGE - echo "buildx tag $STAGE_IMAGE_COMMIT_URI" - if [[ $SINGLE_ARCH == "false" ]]; then + if [[ $MULTI_ARCH == "true" ]]; then # Build our dockerfile, add timing information docker buildx build --platform $PLATFORMS --target $STAGE $STAGE_CACHE_FROM -t $STAGE_IMAGE_COMMIT_URI -f $DOCKERFILE --build-arg COMMIT_TAG=$COMMIT_TAG_VERSION --build-arg ARG_CONTENT_HASH=$CONTENT_HASH --push . \ | while read line ; do echo "$(date "+%H:%M:%S")| $line"; done @@ -206,7 +205,7 @@ fi # Build the actual image and give it a commit tag. IMAGE_COMMIT_URI=$ECR_URL/$REPOSITORY:cache-$CONTENT_HASH echo "Building image: $IMAGE_COMMIT_URI" -if [[ $SINGLE_ARCH == "false" ]]; then +if [[ $MULTI_ARCH == "true" ]]; then # Build our dockerfile, add timing information docker buildx build --platform $PLATFORMS --target $STAGE $STAGE_CACHE_FROM -t $STAGE_IMAGE_COMMIT_URI -f $DOCKERFILE --build-arg COMMIT_TAG=$COMMIT_TAG_VERSION --build-arg ARG_CONTENT_HASH=$CONTENT_HASH --push . \ | while read line ; do echo "$(date "+%H:%M:%S")| $line"; done