From 428a6655e18e640f9e953d6c670305f35cd617fe Mon Sep 17 00:00:00 2001 From: spypsy Date: Mon, 18 Sep 2023 16:48:45 +0000 Subject: [PATCH 1/2] fix: typo in build script --- build-system/scripts/build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-system/scripts/build b/build-system/scripts/build index ba1ae13e2270..7cb6d0241cc5 100755 --- a/build-system/scripts/build +++ b/build-system/scripts/build @@ -127,7 +127,7 @@ for PARENT in $PARENTS; do retry docker tag $PARENT_IMAGE_URI $TAG done -COMMIT_TAG_VERSION=$(extract_tag_version $REPOSITORY false) +COMMIT_TAG_VERSION=$(extract_tag_version $REPOSITORY "false") # Pull, build and push each named stage to cache. STAGE_CACHE_FROM="" From c273706f54bc551a412f572dd922c5c3c47e54e6 Mon Sep 17 00:00:00 2001 From: spypsy Date: Mon, 18 Sep 2023 22:08:38 +0000 Subject: [PATCH 2/2] Don't exit build on failed grep --- build-system/scripts/build | 5 ++++- yarn-project/canary/Dockerfile | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/build-system/scripts/build b/build-system/scripts/build index 7cb6d0241cc5..dc35f572280c 100755 --- a/build-system/scripts/build +++ b/build-system/scripts/build @@ -83,8 +83,10 @@ if [[ $FORCE_BUILD == 'false' ]] && check_rebuild cache-"$CONTENT_HASH" $REPOSIT exit 0 fi +echo "Initializing submodules..." init_submodules $REPOSITORY +echo "Checking for terraform..." # Validate any terraform if it exists. if [ -d $ROOT_PATH/$PROJECT_DIR/terraform ]; then ensure_terraform @@ -102,7 +104,7 @@ if [ -d $ROOT_PATH/$PROJECT_DIR/terraform ]; then fi # Pull latest parents that are not ours. We also do not want to pull images suffixed by _, this is how we scope intermediate build images. -PARENTS=$(cat $DOCKERFILE | sed -n -e 's/^FROM \([^[:space:]]\+\).*/\1/p' | sed '/_$/d' | grep -v $ECR_DEPLOY_URL | sort | uniq) +PARENTS=$(cat $DOCKERFILE | sed -n -e 's/^FROM \([^[:space:]]\+\).*/\1/p' | sed '/_$/d' | { grep -v $ECR_DEPLOY_URL || true; } | sort | uniq) for PARENT in $PARENTS; do [ "$PARENT" == "scratch" ] && continue fetch_image $PARENT @@ -127,6 +129,7 @@ for PARENT in $PARENTS; do retry docker tag $PARENT_IMAGE_URI $TAG done +echo "Extracting commit tag version..." COMMIT_TAG_VERSION=$(extract_tag_version $REPOSITORY "false") # Pull, build and push each named stage to cache. diff --git a/yarn-project/canary/Dockerfile b/yarn-project/canary/Dockerfile index d24db9ae8613..8e2455ef174d 100644 --- a/yarn-project/canary/Dockerfile +++ b/yarn-project/canary/Dockerfile @@ -22,6 +22,10 @@ WORKDIR /usr/src/yarn-project/canary RUN ./scripts/update_packages.sh $COMMIT_TAG RUN yarn && yarn build +FROM node:18-alpine +COPY --from=builder /usr/src/ /usr/src/ +WORKDIR /usr/src/yarn-project/canary + # Copy web artifacts for browser test RUN cp ./node_modules/@aztec/aztec.js/dest/main.js src/web/ RUN cp ./node_modules/@aztec/circuits.js/resources/aztec3-circuits.wasm src/web/