Skip to content

Commit 6c4bf75

Browse files
authored
fix(ci): contracts_deployed check (AztecProtocol#3703)
- Fix syntax for checking if contracts were deployed - Fix separator for `TO_TAINT` var list - disable boxes in CI because of AztecProtocol#3705 # Checklist: Remove the checklist to signal you've completed it. Enable auto-merge if the PR is ready to merge. - [ ] If the pull request requires a cryptography review (e.g. cryptographic algorithm implementations) I have added the 'crypto' tag. - [ ] I have reviewed my diff in github, line by line and removed unexpected formatting changes, testing logs, or commented-out code. - [ ] Every change is related to the PR description. - [ ] I have [linked](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) this pull request to relevant issues (if any exist).
1 parent c43c71b commit 6c4bf75

File tree

4 files changed

+25
-18
lines changed

4 files changed

+25
-18
lines changed

.circleci/config.yml

+15-14
Original file line numberDiff line numberDiff line change
@@ -971,8 +971,9 @@ jobs:
971971
export TF_VAR_NODE_1_PRIVATE_KEY=$NODE_1_PRIVATE_KEY
972972
export TF_VAR_NODE_2_PRIVATE_KEY=$NODE_2_PRIVATE_KEY
973973
# Check if l1-contracts have changed
974-
if $CONTRACTS_DEPLOYED -eq 1; then
975-
deploy_terraform_services yarn-project/aztec-node aztec-sandbox aztec-node aws_efs_file_system.node_data_store
974+
if [ "$CONTRACTS_DEPLOYED" -eq 1 ]; then
975+
echo "Contracts have changed, taint nodes to force redeploy.."
976+
deploy_terraform_services yarn-project/aztec-node aztec-sandbox aztec-node "aws_ecs_task_definition.aztec-node[0],aws_ecs_task_definition.aztec-node[1]"
976977
else
977978
deploy_terraform_services yarn-project/aztec-node aztec-sandbox
978979
fi
@@ -1104,18 +1105,18 @@ workflows:
11041105
- aztec-faucet: *defaults_yarn_project_prod
11051106

11061107
# Boxes.
1107-
- boxes-blank-react:
1108-
requires:
1109-
- aztec-sandbox
1110-
<<: *defaults
1111-
- boxes-blank:
1112-
requires:
1113-
- aztec-sandbox
1114-
<<: *defaults
1115-
- boxes-token:
1116-
requires:
1117-
- aztec-sandbox
1118-
<<: *defaults
1108+
# - boxes-blank-react:
1109+
# requires:
1110+
# - aztec-sandbox
1111+
# <<: *defaults
1112+
# - boxes-blank:
1113+
# requires:
1114+
# - aztec-sandbox
1115+
# <<: *defaults
1116+
# - boxes-token:
1117+
# requires:
1118+
# - aztec-sandbox
1119+
# <<: *defaults
11191120

11201121
# End to end tests.
11211122
- e2e-join:

boxes/run_tests

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set -eu
66

77
# The box name is the name of the directory containing the docker-compose.yml file
88
# The current dir is assumed to be `yarn-project/boxes`, as this script `yarn-project/boxes/run_tests`
9-
CURRENT_DIR=`dirname $0`
9+
CURRENT_DIR=$(dirname $0)
1010
BOX_NAME=${1:-boxes-blank}
1111

1212
cd $CURRENT_DIR/$BOX_NAME
@@ -58,4 +58,4 @@ docker-compose -f $COMPOSE_FILE up --exit-code-from boxes-$BOX_NAME
5858
# Success - push a new tag for the commit hash with the box name appended
5959
IMAGE_COMMIT_URI=$SANDBOX_IMAGE_URI-$BOX_NAME
6060
retry docker tag $SANDBOX_IMAGE_URI $IMAGE_COMMIT_URI
61-
retry docker push $IMAGE_COMMIT_URI > /dev/null 2>&1
61+
retry docker push $IMAGE_COMMIT_URI >/dev/null 2>&1

build-system/scripts/deploy_terraform

+7-1
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,14 @@ fi
3939

4040
terraform init -input=false $BACKEND_CONFIG
4141

42+
IFS=','
43+
# Tainting listed resources.
4244
for RESOURCE in $TO_TAINT; do
43-
terraform taint $RESOURCE || true
45+
if [ "$DRY_DEPLOY" -eq 1 ]; then
46+
echo "DRY_DEPLOY: terraform taint $RESOURCE"
47+
else
48+
terraform taint $RESOURCE || true
49+
fi
4450
done
4551

4652
if [ "$DRY_DEPLOY" -eq 1 ]; then

l1-contracts/REDEPLOY

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# Append value to force redeploy
2-
3
2+
4

0 commit comments

Comments
 (0)