Skip to content

Commit

Permalink
fix(ci): contracts_deployed check (AztecProtocol#3703)
Browse files Browse the repository at this point in the history
- 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).
  • Loading branch information
spypsy committed Dec 15, 2023
1 parent c43c71b commit 6c4bf75
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 18 deletions.
29 changes: 15 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -971,8 +971,9 @@ jobs:
export TF_VAR_NODE_1_PRIVATE_KEY=$NODE_1_PRIVATE_KEY
export TF_VAR_NODE_2_PRIVATE_KEY=$NODE_2_PRIVATE_KEY
# Check if l1-contracts have changed
if $CONTRACTS_DEPLOYED -eq 1; then
deploy_terraform_services yarn-project/aztec-node aztec-sandbox aztec-node aws_efs_file_system.node_data_store
if [ "$CONTRACTS_DEPLOYED" -eq 1 ]; then
echo "Contracts have changed, taint nodes to force redeploy.."
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]"
else
deploy_terraform_services yarn-project/aztec-node aztec-sandbox
fi
Expand Down Expand Up @@ -1104,18 +1105,18 @@ workflows:
- aztec-faucet: *defaults_yarn_project_prod

# Boxes.
- boxes-blank-react:
requires:
- aztec-sandbox
<<: *defaults
- boxes-blank:
requires:
- aztec-sandbox
<<: *defaults
- boxes-token:
requires:
- aztec-sandbox
<<: *defaults
# - boxes-blank-react:
# requires:
# - aztec-sandbox
# <<: *defaults
# - boxes-blank:
# requires:
# - aztec-sandbox
# <<: *defaults
# - boxes-token:
# requires:
# - aztec-sandbox
# <<: *defaults

# End to end tests.
- e2e-join:
Expand Down
4 changes: 2 additions & 2 deletions boxes/run_tests
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -eu

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

cd $CURRENT_DIR/$BOX_NAME
Expand Down Expand Up @@ -58,4 +58,4 @@ docker-compose -f $COMPOSE_FILE up --exit-code-from boxes-$BOX_NAME
# Success - push a new tag for the commit hash with the box name appended
IMAGE_COMMIT_URI=$SANDBOX_IMAGE_URI-$BOX_NAME
retry docker tag $SANDBOX_IMAGE_URI $IMAGE_COMMIT_URI
retry docker push $IMAGE_COMMIT_URI > /dev/null 2>&1
retry docker push $IMAGE_COMMIT_URI >/dev/null 2>&1
8 changes: 7 additions & 1 deletion build-system/scripts/deploy_terraform
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,14 @@ fi

terraform init -input=false $BACKEND_CONFIG

IFS=','
# Tainting listed resources.
for RESOURCE in $TO_TAINT; do
terraform taint $RESOURCE || true
if [ "$DRY_DEPLOY" -eq 1 ]; then
echo "DRY_DEPLOY: terraform taint $RESOURCE"
else
terraform taint $RESOURCE || true
fi
done

if [ "$DRY_DEPLOY" -eq 1 ]; then
Expand Down
2 changes: 1 addition & 1 deletion l1-contracts/REDEPLOY
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Append value to force redeploy
3
4

0 comments on commit 6c4bf75

Please sign in to comment.