Skip to content

Commit

Permalink
fix(ci): Incorrect content hash in some build targets (#1973)
Browse files Browse the repository at this point in the history
Previously content hash was not correct everywhere. Fixes a current
working directory issue, and issues with spot tests not pulling the
right image hashes.
  • Loading branch information
ludamad authored and AztecBot committed Sep 4, 2023
1 parent 155e32b commit c6c469a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cpp/scripts/bb-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -eu
$(aws ecr get-login --region us-east-2 --no-include-email) 2> /dev/null
REPOSITORY=barretenberg-x86_64-linux-clang-assert
# use the image rebuild patterns to compute a content hash, use this to get a URI
IMAGE_URI="278380418400.dkr.ecr.us-east-2.amazonaws.com/$REPOSITORY:cache-$CONTENT_HASH"
IMAGE_URI=$($(git rev-parse --show-toplevel)/build-system/scripts/calculate_image_uri $REPOSITORY)
docker pull $IMAGE_URI

TESTS=(
Expand Down
3 changes: 2 additions & 1 deletion cpp/scripts/bin-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ set -eu

$(aws ecr get-login --region us-east-2 --no-include-email) 2> /dev/null
REPOSITORY=barretenberg-x86_64-linux-clang-assert
IMAGE_URI="278380418400.dkr.ecr.us-east-2.amazonaws.com/$REPOSITORY:cache-$CONTENT_HASH"
IMAGE_URI=$($(git rev-parse --show-toplevel)/build-system/scripts/calculate_image_uri $REPOSITORY)

docker pull $IMAGE_URI

docker run --rm -t $IMAGE_URI /bin/sh -c "\
Expand Down
2 changes: 1 addition & 1 deletion cpp/scripts/run_aztec_circuits_tests
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ shift # to aztec's circuits `run_tests_local`
$(aws ecr get-login --region us-east-2 --no-include-email) 2> /dev/null

REPOSITORY="barretenberg-circuits-${ARCH}-linux-clang-builder-runner"
IMAGE_URI="278380418400.dkr.ecr.us-east-2.amazonaws.com/$REPOSITORY:cache-$CONTENT_HASH"
IMAGE_URI=$($(git rev-parse --show-toplevel)/build-system/scripts/calculate_image_uri $REPOSITORY)
docker pull $IMAGE_URI

if [ "$ARCH" != "wasm" ]; then
Expand Down
2 changes: 1 addition & 1 deletion cpp/scripts/run_tests
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ $(aws ecr get-login --region us-east-2 --no-include-email) 2> /dev/null

# use the image rebuild patterns to compute a content hash, use this to get a URI
REPOSITORY=barretenberg-x86_64-linux-clang-assert
IMAGE_URI="278380418400.dkr.ecr.us-east-2.amazonaws.com/$REPOSITORY:cache-$CONTENT_HASH"
IMAGE_URI=$($(git rev-parse --show-toplevel)/build-system/scripts/calculate_image_uri $REPOSITORY)
docker pull $IMAGE_URI

if [ -f "$TESTS" ]; then
Expand Down
4 changes: 3 additions & 1 deletion ts/scripts/run_tests
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
set -e

$(aws ecr get-login --region us-east-2 --no-include-email) 2> /dev/null
IMAGE_URI=278380418400.dkr.ecr.us-east-2.amazonaws.com/bb.js:cache-$CONTENT_HASH

REPOSITORY=bb.js
IMAGE_URI=$($(git rev-parse --show-toplevel)/build-system/scripts/calculate_image_uri $REPOSITORY)
docker run --rm $IMAGE_URI

0 comments on commit c6c469a

Please sign in to comment.