From 56344d98748051855d9ef09d2fd6130034513a3d Mon Sep 17 00:00:00 2001 From: PhilWindle Date: Thu, 14 Sep 2023 10:45:17 +0000 Subject: [PATCH] Try different tags --- .circleci/config.yml | 4 ++-- build-system/scripts/build | 23 +++++++++++++---------- build-system/scripts/force_deploy_build | 8 ++++---- build_manifest.json | 7 +------ 4 files changed, 20 insertions(+), 22 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ea775e331ef..a708703b610 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -592,7 +592,7 @@ jobs: - *setup_env - run: name: "Build and test" - command: force_deploy_build aztec-sandbox-x86_64 true + command: force_deploy_build aztec-sandbox true x86_64 aztec-sandbox-arm64: machine: @@ -603,7 +603,7 @@ jobs: - *setup_env - run: name: "Build and test" - command: force_deploy_build aztec-sandbox-arm64 true + command: force_deploy_build aztec-sandbox true arm64 aztec-sandbox-ecr-manifest: machine: diff --git a/build-system/scripts/build b/build-system/scripts/build index f007515c92e..23a01e8b3b8 100755 --- a/build-system/scripts/build +++ b/build-system/scripts/build @@ -26,7 +26,7 @@ set -euo pipefail REPOSITORY=$1 FORCE_BUILD=${2:-"false"} -PLATFORMS=${3:-"linux/amd64"} +PLATFORM=${3:-""} DOCKERFILE=$(query_manifest dockerfile $REPOSITORY) PROJECT_DIR=$(query_manifest projectDir $REPOSITORY) BUILD_DIR=$(query_manifest buildDir $REPOSITORY) @@ -68,15 +68,15 @@ echo "Content hash: $CONTENT_HASH" cd $BUILD_DIR MULTI_ARCH="false" -if [[ $PLATFORMS != "linux/amd64" ]]; then - MULTI_ARCH="true" - retry ensure_docker_buildx - echo "Creating multi-platform builder" - docker buildx create --name multi-platform-builder --bootstrap --use - echo "Multi-platform builder created" - - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes -fi +# if [[ $PLATFORMS != "linux/amd64" ]]; then +# MULTI_ARCH="true" +# retry ensure_docker_buildx +# echo "Creating multi-platform builder" +# docker buildx create --name multi-platform-builder --bootstrap --use +# echo "Multi-platform builder created" + +# docker run --rm --privileged multiarch/qemu-user-static --reset -p yes +# fi # If we have previously successful commit, we can early out if nothing relevant has changed since. if [[ $FORCE_BUILD == 'false' ]] && check_rebuild cache-"$CONTENT_HASH" $REPOSITORY; then @@ -203,6 +203,9 @@ fi # Build the actual image and give it a commit tag. IMAGE_COMMIT_URI=$ECR_URL/$REPOSITORY:cache-$CONTENT_HASH +if [[ -n "$PLATFORM" ]]; then + IMAGE_COMMIT_URI=$IMAGE_COMMIT_URI-$PLATFORM +fi echo "Building image: $IMAGE_COMMIT_URI" if [[ $MULTI_ARCH == "true" ]]; then # Build our dockerfile, add timing information diff --git a/build-system/scripts/force_deploy_build b/build-system/scripts/force_deploy_build index dab47706db6..e5a76665b16 100755 --- a/build-system/scripts/force_deploy_build +++ b/build-system/scripts/force_deploy_build @@ -13,7 +13,7 @@ shift # if FORCE_BUILD is already set, just continue with it if [[ $FORCE_BUILD == 'true' ]]; then - build $REPOSITORY true + build $REPOSITORY true $@ exit 0 fi @@ -39,12 +39,12 @@ if [[ -n "${COMMIT_TAG:-}" ]]; then VERSION=$(npx semver $COMMIT_TAG_VERSION) if [ -z "$VERSION" ]; then # Not a version tag, build normally - build $REPOSITORY + build $REPOSITORY false $@ else # Force build - build $REPOSITORY true + build $REPOSITORY true $@ fi else # Not a tagged commit, build normally - build $REPOSITORY + build $REPOSITORY false $@ fi diff --git a/build_manifest.json b/build_manifest.json index 5d2c28803c6..2d55f73f907 100644 --- a/build_manifest.json +++ b/build_manifest.json @@ -116,12 +116,7 @@ "buildDir": "yarn-project", "projectDir": "yarn-project/aztec-sandbox" }, - "aztec-sandbox-arm64": { - "buildDir": "yarn-project", - "projectDir": "yarn-project/aztec-sandbox", - "dockerfile": "Dockerfile.final" - }, - "aztec-sandbox-x86_64": { + "aztec-sandbox": { "buildDir": "yarn-project", "projectDir": "yarn-project/aztec-sandbox", "dockerfile": "Dockerfile.final"