Skip to content

Commit

Permalink
Try different tags
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilWindle committed Sep 14, 2023
1 parent bb53506 commit 56344d9
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 22 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
23 changes: 13 additions & 10 deletions build-system/scripts/build
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions build-system/scripts/force_deploy_build
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
7 changes: 1 addition & 6 deletions build_manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 56344d9

Please sign in to comment.