Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ci): contracts_deployed check #3703

Merged
merged 8 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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