Skip to content

Commit

Permalink
feat: add aztecprotocol/aztec-builder (#6116)
Browse files Browse the repository at this point in the history
Run aztec-builder through a docker image
  • Loading branch information
alexghr committed May 1, 2024
1 parent f60dfcd commit 30899d0
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 3 deletions.
15 changes: 15 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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: |
Expand Down Expand Up @@ -693,6 +706,7 @@ workflows:

# Artifacts
- aztec-package: *defaults_yarn_project
- aztec-builder: *defaults_yarn_project

# Boxes.
- boxes:
Expand Down Expand Up @@ -732,6 +746,7 @@ workflows:
- noir-packages-tests
- prover-client-test
- e2e-join
- aztec-builder
<<: *defaults

# Production releases.
Expand Down
2 changes: 1 addition & 1 deletion aztec-up/bin/aztec-cli → aztec-up/bin/aztec-builder
Original file line number Diff line number Diff line change
Expand Up @@ -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 $@
7 changes: 7 additions & 0 deletions build_manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
6 changes: 6 additions & 0 deletions yarn-project/builder/Dockerfile
Original file line number Diff line number Diff line change
@@ -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=""

0 comments on commit 30899d0

Please sign in to comment.