diff --git a/yarn-project/end-to-end/scripts/cond_run_script b/yarn-project/end-to-end/scripts/cond_run_script index c1eae55ff32a..582f2ef058ac 100755 --- a/yarn-project/end-to-end/scripts/cond_run_script +++ b/yarn-project/end-to-end/scripts/cond_run_script @@ -25,10 +25,10 @@ shift CONTENT_HASH=$(calculate_content_hash $REPOSITORY) -echo "Last successful commit for $SUCCESS_TAG: $CONTENT_HASH" +echo "Content hash: $CONTENT_HASH" echo "Script to run is $SCRIPT_TO_RUN $@" -if ! check_rebuild cache-$COMMIT_HASH-$SUCCESS_TAG $REPOSITORY; then +if ! check_rebuild cache-$CONTENT_HASH-$SUCCESS_TAG $REPOSITORY; then "$SCRIPT_TO_RUN" "$@" - tag_remote_image $REPOSITORY cache-$COMMIT_HASH cache-$COMMIT_HASH-$SUCCESS_TAG + tag_remote_image $REPOSITORY cache-$CONTENT_HASH cache-$CONTENT_HASH-$SUCCESS_TAG fi diff --git a/yarn-project/end-to-end/scripts/run_tests b/yarn-project/end-to-end/scripts/run_tests index ad3f295edf4e..da2f161501d0 100755 --- a/yarn-project/end-to-end/scripts/run_tests +++ b/yarn-project/end-to-end/scripts/run_tests @@ -6,14 +6,13 @@ set -e export TEST=$1 export COMPOSE_FILE=${2:-docker-compose.yml} -if [ -n "$COMMIT_HASH" ]; then - $(aws ecr get-login --region us-east-2 --no-include-email) 2> /dev/null +CONTENT_HASH=$(calculate_content_hash $REPO) +$(aws ecr get-login --region us-east-2 --no-include-email) 2> /dev/null - for REPO in aztec.js end-to-end aztec-sandbox; do - docker pull 278380418400.dkr.ecr.us-east-2.amazonaws.com/$REPO:cache-$COMMIT_HASH - docker tag 278380418400.dkr.ecr.us-east-2.amazonaws.com/$REPO:cache-$COMMIT_HASH aztecprotocol/$REPO:latest - done -fi +for REPO in aztec.js end-to-end aztec-sandbox; do + docker pull 278380418400.dkr.ecr.us-east-2.amazonaws.com/$REPO:cache-$CONTENT_HASH + docker tag 278380418400.dkr.ecr.us-east-2.amazonaws.com/$REPO:cache-$CONTENT_HASH aztecprotocol/$REPO:latest +done docker-compose rm -f -docker-compose -f $COMPOSE_FILE up --exit-code-from end-to-end \ No newline at end of file +docker-compose -f $COMPOSE_FILE up --exit-code-from end-to-end