From eaffbc0f00d9227e450f6cea04eff7cb58ab26d8 Mon Sep 17 00:00:00 2001 From: Alex Gherghisan Date: Tue, 31 Oct 2023 10:03:37 +0000 Subject: [PATCH] fix: build cli image and publish aztecprotocol/cli --- .circleci/config.yml | 38 ++++++++++++++++++++++++++++++++ build_manifest.yml | 2 +- yarn-project/cli/aztec-cli | 2 +- yarn-project/deploy_dockerhub.sh | 2 +- 4 files changed, 41 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index edecd9b086d..49097fff0e3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -454,6 +454,32 @@ jobs: echo "export DOCKER_BUILDKIT=" > $BASH_ENV build aztec-sandbox false arm64 + cli-x86_64: + machine: + image: ubuntu-2204:2023.07.2 + resource_class: large + steps: + - *checkout + - *setup_env + - run: + name: "Build and test" + command: build cli false x86_64 + + cli-arm64: + machine: + image: ubuntu-2204:2023.07.2 + resource_class: arm.large + steps: + - *checkout + - *setup_env + - run: + name: "Build and test" + # We need to force not to use docker buildkit because for some reason on arm only, it ends up making a call + # out to eu-west2 despite the image being locally tagged, resulting in unauthorized 401. Weird docker bug? + command: | + echo "export DOCKER_BUILDKIT=" > $BASH_ENV + build cli false arm64 + aztec-p2p-bootstrap: machine: image: ubuntu-2204:2023.07.2 @@ -547,6 +573,7 @@ jobs: command: | create_ecr_manifest aztec-sandbox x86_64,arm64 create_ecr_manifest pxe x86_64,arm64 + create_ecr_manifest cli x86_64,arm64 boxes-blank-react: machine: @@ -1260,6 +1287,15 @@ workflows: - yarn-project <<: *defaults + - cli-x86_64: + requires: + - yarn-project + <<: *defaults + - cli-arm64: + requires: + - yarn-project + <<: *defaults + - aztec-p2p-bootstrap: requires: - yarn-project @@ -1290,6 +1326,8 @@ workflows: - aztec-sandbox-arm64 - pxe-x86_64 - pxe-arm64 + - cli-x86_64 + - cli-arm64 <<: *defaults - boxes-blank-react: diff --git a/build_manifest.yml b/build_manifest.yml index 5bf584a3f3e..8adee0e270e 100644 --- a/build_manifest.yml +++ b/build_manifest.yml @@ -124,7 +124,7 @@ aztec-faucet: dependencies: - yarn-project -aztec-cli: +cli: buildDir: yarn-project projectDir: yarn-project/cli dependencies: diff --git a/yarn-project/cli/aztec-cli b/yarn-project/cli/aztec-cli index 1ca8a521c55..6fa3e72b27e 100755 --- a/yarn-project/cli/aztec-cli +++ b/yarn-project/cli/aztec-cli @@ -34,7 +34,7 @@ fi # fallback on docker -CLI_IMAGE=${CLI_IMAGE:-"aztecprotocol/aztec-cli"} +CLI_IMAGE=${CLI_IMAGE:-"aztecprotocol/cli"} CLI_VERSION=${CLI_VERSION:-"latest"} DOCKER_PATH="" diff --git a/yarn-project/deploy_dockerhub.sh b/yarn-project/deploy_dockerhub.sh index 7a0ff5d0aa9..e159274b1b7 100755 --- a/yarn-project/deploy_dockerhub.sh +++ b/yarn-project/deploy_dockerhub.sh @@ -5,7 +5,7 @@ DIST_TAG=${1:-"latest"} extract_repo yarn-project /usr/src project PROJECT_ROOT=$(pwd)/project/src/ -for REPOSITORY in "pxe" "aztec-sandbox"; do +for REPOSITORY in "pxe" "aztec-sandbox" "cli"; do echo "Deploying $REPOSITORY $DIST_TAG" RELATIVE_PROJECT_DIR=$(query_manifest relativeProjectDir $REPOSITORY) cd "$PROJECT_ROOT/$RELATIVE_PROJECT_DIR"