From 9b6be227169c9ee923744601ff3072b134e12f41 Mon Sep 17 00:00:00 2001 From: spypsy Date: Thu, 26 Oct 2023 13:45:46 +0100 Subject: [PATCH] fix: run deploy step for mainnet fork (#3052) Deploy mainnet fork image to ECR on CI # 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). --- .circleci/config.yml | 15 +++++++++++++++ iac/mainnet-fork/terraform/main.tf | 4 ++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1aa29858502..79993c70dc7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -487,6 +487,17 @@ jobs: name: "Build" command: build mainnet-fork | add_timestamps + deploy-mainnet-fork: + machine: + image: ubuntu-2204:2023.07.2 + resource_class: medium + steps: + - *checkout + - *setup_env + - run: + name: "Deploy mainnet fork" + command: deploy_ecr mainnet-fork + aztec-faucet: machine: image: ubuntu-2204:2023.07.2 @@ -1235,6 +1246,10 @@ workflows: - noir-contracts-build: *defaults - mainnet-fork: *defaults + - deploy-mainnet-fork: + requires: + - mainnet-fork + <<: *deploy_defaults # Yarn Project - yarn-project-base: diff --git a/iac/mainnet-fork/terraform/main.tf b/iac/mainnet-fork/terraform/main.tf index beb2ab35357..9104c0888c1 100644 --- a/iac/mainnet-fork/terraform/main.tf +++ b/iac/mainnet-fork/terraform/main.tf @@ -228,7 +228,7 @@ resource "aws_ecs_service" "aztec_mainnet_fork" { } load_balancer { - target_group_arn = aws_alb_target_group.aztec_mainnet_fork.arn + target_group_arn = aws_alb_target_group.mainnet_fork.arn container_name = "aztec-network-mainnet-fork" container_port = 80 } @@ -253,7 +253,7 @@ resource "aws_lb_listener_rule" "aztec_mainnet_fork_route" { action { type = "forward" - target_group_arn = aws_alb_target_group.aztec_mainnet_fork.arn + target_group_arn = aws_alb_target_group.mainnet_fork.arn } condition {