diff --git a/.circleci/config.yml b/.circleci/config.yml index 70b0393270e..bbb89ae9a2a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -431,6 +431,18 @@ jobs: command: build aztec aztec_manifest_key: aztec + aztec-builder: + machine: + image: default + resource_class: small + steps: + - *checkout + - *setup_env + - run: + name: "Build image" + command: build aztec-builder + aztec_manifest_key: aztec-builder + boxes: docker: - image: aztecprotocol/alpine-build-image @@ -514,6 +526,7 @@ jobs: should_release || exit 0 deploy_dockerhub noir deploy_dockerhub aztec + deploy_dockerhub aztec-builder - run: name: "Release canary to NPM: bb.js" command: | @@ -693,6 +706,7 @@ workflows: # Artifacts - aztec-package: *defaults_yarn_project + - aztec-builder: *defaults_yarn_project # Boxes. - boxes: @@ -732,6 +746,7 @@ workflows: - noir-packages-tests - prover-client-test - e2e-join + - aztec-builder <<: *defaults # Production releases. diff --git a/aztec-up/bin/aztec-cli b/aztec-up/bin/aztec-builder similarity index 80% rename from aztec-up/bin/aztec-cli rename to aztec-up/bin/aztec-builder index 3624338b5c3..a676553772f 100755 --- a/aztec-up/bin/aztec-cli +++ b/aztec-up/bin/aztec-builder @@ -5,4 +5,4 @@ export ENV_VARS_TO_INJECT="PXE_URL PRIVATE_KEY DEBUG" export PXE_URL=${PXE_URL:-"http://host.docker.internal:8080"} export ETHEREUM_HOST=${ETHEREUM_HOST:-"http://host.docker.internal:8545"} -$(dirname $0)/.aztec-run aztecprotocol/cli $@ +$(dirname $0)/.aztec-run aztecprotocol/aztec-builder $@ diff --git a/build_manifest.yml b/build_manifest.yml index 6c79c6810d4..4257cd66e11 100644 --- a/build_manifest.yml +++ b/build_manifest.yml @@ -201,6 +201,13 @@ aztec: - yarn-project multiarch: buildx +aztec-builder: + buildDir: yarn-project + projectDir: yarn-project/builder + dependencies: + - yarn-project + multiarch: buildx + # Builds all the boxes. They are then independently tested in the container. boxes: buildDir: boxes diff --git a/yarn-project/Dockerfile b/yarn-project/Dockerfile index 2038b05b45e..591214a3d39 100644 --- a/yarn-project/Dockerfile +++ b/yarn-project/Dockerfile @@ -32,7 +32,7 @@ RUN ln -s /usr/src/yarn-project/node_modules /usr/src/node_modules ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true RUN ./bootstrap.sh -RUN yarn workspaces focus @aztec/aztec --production && yarn cache clean +RUN yarn workspaces focus @aztec/aztec @aztec/builder --production && yarn cache clean # TODO: Use release-please to update package.json directly, and remove this! # It's here to ensure the image rebuilds if the commit tag changes (as the content hash won't). diff --git a/yarn-project/Earthfile b/yarn-project/Earthfile index 6da55e013d9..7663641719d 100644 --- a/yarn-project/Earthfile +++ b/yarn-project/Earthfile @@ -52,7 +52,7 @@ build-dev: aztec-prod: FROM +build - RUN yarn workspaces focus @aztec/aztec --production && yarn cache clean + RUN yarn workspaces focus @aztec/aztec @aztec/builder --production && yarn cache clean # Remove a bunch of stuff that we don't need that takes up space. RUN rm -rf \ ../noir-projects \ diff --git a/yarn-project/builder/Dockerfile b/yarn-project/builder/Dockerfile new file mode 100644 index 00000000000..086573488ef --- /dev/null +++ b/yarn-project/builder/Dockerfile @@ -0,0 +1,6 @@ +FROM aztecprotocol/yarn-project AS yarn-project +ENTRYPOINT ["node", "--no-warnings", "/usr/src/yarn-project/builder/dest/cli.js"] + +# The version has been updated in yarn-project. +# Adding COMMIT_TAG here to rebuild versioned image. +ARG COMMIT_TAG=""