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

feat: bootstrap_docker skips build it can pull from ecr. #2545

Merged
merged 111 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from 107 commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
04d5136
Initial cci_gen work.
charlielye Sep 16, 2023
27ef8da
Intial
charlielye Sep 16, 2023
06ae9b1
more
charlielye Sep 16, 2023
3d55c7c
Merge remote-tracking branch 'origin/master' into cl/ypb_cleanup
charlielye Sep 16, 2023
a26f1f4
wip
charlielye Sep 16, 2023
61b2b80
wip
charlielye Sep 17, 2023
14a334f
wip
charlielye Sep 17, 2023
63a7d3c
wip
charlielye Sep 17, 2023
cdc2b65
fix
charlielye Sep 17, 2023
c7c5baf
Add yq bin.
charlielye Sep 17, 2023
d3f44c8
Move to native version of yq. Can also now remove jq from build-system.
charlielye Sep 17, 2023
4d818d1
fix
charlielye Sep 17, 2023
d4f5a81
debug
charlielye Sep 17, 2023
36c8251
fix: PATH and bb.js ref
ludamad Sep 18, 2023
3d52670
fix: PATH and bb.js ref
ludamad Sep 18, 2023
7a6e238
fix: PATH and bb.js ref
ludamad Sep 18, 2023
e72e347
Merge remote-tracking branch 'origin/master' into cl/ypb_cleanup
ludamad Sep 19, 2023
a447ffe
fix: pass debug env to spot [debug ci]
ludamad Sep 19, 2023
054efef
tinkering [debug ci]
ludamad Sep 19, 2023
7b93f83
Merge remote-tracking branch 'origin/master' into cl/ypb_cleanup
ludamad Sep 19, 2023
648c910
fix: yarn-project-base-deps not in manifest [debug ci]
ludamad Sep 19, 2023
617f0ac
fix: dont set CACHE_FROM if try_fetch_image fails
ludamad Sep 19, 2023
da5b6d9
Format private-token
ludamad Sep 19, 2023
ff0d592
Lint private-token
ludamad Sep 19, 2023
f1f649e
chore: speed up yarn-project step
ludamad Sep 19, 2023
daf365c
Revert change
ludamad Sep 19, 2023
23c1a93
yarn-project Dockerfile update
ludamad Sep 19, 2023
79ea225
yarn-project Dockerfile update
ludamad Sep 19, 2023
7d491c2
Fix script call.
charlielye Sep 19, 2023
0813f83
wip
charlielye Sep 20, 2023
c01660a
Use r6a instances to build. Higher cpu count for bb. Allow [ci rebuil…
charlielye Sep 20, 2023
ebe6bb3
Run cci_gen. [ci rebuild]
charlielye Sep 20, 2023
36de7fb
Simplify ci cmd stuff. Rollback cpu count to see if it actually helpe…
charlielye Sep 20, 2023
28da340
Forgot to cci_gen... [ci rebuild]
charlielye Sep 20, 2023
5701341
Add timestamps. yolo [ci rebuild]
charlielye Sep 20, 2023
46e468c
Add timestamps. yolo [ci rebuild]
charlielye Sep 20, 2023
6d9378b
Remove redundant timestamps
ludamad Sep 20, 2023
54f89f2
fix: rebuild flag unbound
ludamad Sep 20, 2023
961dd5c
fix: use fetching commit message
ludamad Sep 20, 2023
173b5ee
wip [ci rebuild]
charlielye Sep 20, 2023
576c8f2
Merge remote-tracking branch 'origin/master' into cl/ypb_cleanup
charlielye Sep 20, 2023
5018c7e
Remove cci_gen stuff for now.
charlielye Sep 21, 2023
2128754
Fix
charlielye Sep 21, 2023
b87c3c1
wip
charlielye Sep 21, 2023
fe3390f
README
charlielye Sep 21, 2023
0d227a8
Formatting
charlielye Sep 21, 2023
951bf36
Disable blank tests as not passing.
charlielye Sep 21, 2023
a766965
fix
charlielye Sep 21, 2023
d22b550
fix
charlielye Sep 21, 2023
914e2b9
fix
charlielye Sep 21, 2023
4784413
fix
charlielye Sep 21, 2023
c4abeac
fix
charlielye Sep 21, 2023
644c8f2
fix
charlielye Sep 21, 2023
1e0e6ba
ypb down to 730MB
charlielye Sep 23, 2023
3596ee8
Smaller builds using pnp (at last second), and some incantations.
charlielye Sep 24, 2023
30e5e86
Comments.
charlielye Sep 24, 2023
c95c1f2
Bump ubuntu machine executor image to 2204
charlielye Sep 24, 2023
5738974
Fix wait on missing image.
charlielye Sep 24, 2023
d8ecba6
Revert Dockerfile.dockerignore to work with Docker v20. Can move to m…
charlielye Sep 24, 2023
c8da4d2
Fix sandbox dockerfile
charlielye Sep 24, 2023
b3afd23
Fix canary Dockerfile.
charlielye Sep 24, 2023
3e5a985
Add tests to own job.
charlielye Sep 24, 2023
6d05422
Make tests actually run...
charlielye Sep 24, 2023
2238e78
Add ecr_login
charlielye Sep 24, 2023
a10336c
Fix browser.
charlielye Sep 24, 2023
0c7a83d
Make yarn-project use some rebuild patterns. May need tweaking. Fix a…
charlielye Sep 24, 2023
2434d9a
Try and get browser test working again.
charlielye Sep 24, 2023
b1a8f4b
Fix canary.
charlielye Sep 24, 2023
a03f341
Merge remote-tracking branch 'origin/master' into cl/ypb_cleanup
charlielye Sep 25, 2023
3b5a942
fix: ypb deploy (#2464)
ludamad Sep 25, 2023
1a77721
chore: yarn project test breakup (#2484)
ludamad Sep 25, 2023
47a83d2
Merge branch 'master' into cl/ypb_cleanup
ludamad Sep 25, 2023
d0446aa
fix: cimg
ludamad Sep 25, 2023
46b3ab4
fix: cimg
ludamad Sep 25, 2023
2037278
[ci debug]
ludamad Sep 25, 2023
4e0cb82
Merge remote-tracking branch 'origin/cl/ypb_cleanup' into cl/ybp_smaller
charlielye Sep 25, 2023
c01cae3
fix: Use calculate_image_uri
ludamad Sep 25, 2023
6322f5c
[ci debug]
ludamad Sep 25, 2023
71ca071
ecr login [ci debug]
ludamad Sep 25, 2023
4376ca9
Merge remote-tracking branch 'origin/cl/ypb_cleanup' into cl/ybp_smaller
charlielye Sep 25, 2023
a79cd39
fix: dont require tag
ludamad Sep 25, 2023
5507089
fix: dont require tag
ludamad Sep 25, 2023
b8b23cd
Fix merge. yarn-project on spot.
charlielye Sep 25, 2023
5fe0019
Merge remote-tracking branch 'origin/cl/ypb_cleanup' into cl/ybp_smaller
charlielye Sep 25, 2023
50cf1a2
Fix canary deploy build.
charlielye Sep 25, 2023
5901208
Merge remote-tracking branch 'origin/master' into cl/ybp_smaller
charlielye Sep 25, 2023
8219860
Fix merge oops.
charlielye Sep 25, 2023
12a07a2
Merge branch 'master' into cl/ybp_smaller
charlielye Sep 25, 2023
03129c1
Parallel wasm/wasm-threads build.
charlielye Sep 25, 2023
a1b3ccc
Shift pnpify into final artefact, separate formatting again. [ci rebu…
charlielye Sep 25, 2023
eee400c
Merge [ci rebuild]
charlielye Sep 25, 2023
0510b1e
[ci rebuild yarn-project]
charlielye Sep 25, 2023
fdde4b9
Simpler build that doesn't push/pull to leverage layer cache.
charlielye Sep 25, 2023
9d6f022
Attempt to handle ' in commit msg.
charlielye Sep 25, 2023
91fd342
[ci rebuild yarn-project]
charlielye Sep 25, 2023
d39a46f
[ci rebuild yarn-project]
charlielye Sep 25, 2023
1f898e3
[ci rebuild yarn-project]
charlielye Sep 25, 2023
05bb816
[ci rebuild]
charlielye Sep 25, 2023
d400647
Add yarn-project as doc dep.
charlielye Sep 25, 2023
a3f2fab
Fix docs
charlielye Sep 26, 2023
2497b24
Add file.
charlielye Sep 26, 2023
a11e2d0
Remove pnp. Gains not worth it.
charlielye Sep 26, 2023
21506f6
Merge remote-tracking branch 'origin/master' into cl/ybp_smaller
charlielye Sep 26, 2023
6d827ce
Slim stage yarn-project.
charlielye Sep 26, 2023
1ff4e45
Formatting.
charlielye Sep 26, 2023
d16ad40
Merge branch 'cl/ybp_smaller' into cl/no_build_layer_cache
charlielye Sep 26, 2023
b495771
boostrap_docker will skip builds it can pull from ecr
charlielye Sep 26, 2023
7dd3c5a
Consider working tree when computing content hash (on request)
charlielye Sep 26, 2023
736be1b
Merge remote-tracking branch 'origin/master' into cl/bootstrap_docker…
charlielye Sep 26, 2023
6dcf540
Favour rebuilding changed over computing new hash.
charlielye Sep 27, 2023
b67799a
Color!
charlielye Sep 27, 2023
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
32 changes: 16 additions & 16 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ jobs:
yarn-project-base:
machine:
image: ubuntu-2204:2023.07.2
resource_class: xlarge
resource_class: large
steps:
- *checkout
- *setup_env
Expand All @@ -395,27 +395,27 @@ jobs:
name: Build
command: build yarn-project | add_timestamps

yarn-project-format:
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
yarn-project-formatting:
machine:
image: ubuntu-2204:2023.07.2
resource_class: large
steps:
- *checkout
- *setup_env
- run:
name: Build
command: cond_spot_run_script yarn-project 32 cond_run_container yarn-project formatting | add_timestamps
name: Check Formatting
command: cond_run_container yarn-project formatting | add_timestamps

yarn-project-test:
yarn-project-tests:
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
steps:
- *checkout
- *setup_env
- run:
name: Build
command: cond_spot_run_script yarn-project 64 cond_run_container yarn-project test | add_timestamps
name: Test
command: cond_spot_run_container yarn-project 64 test | add_timestamps

aztec-sandbox-base:
machine:
Expand Down Expand Up @@ -1130,18 +1130,18 @@ workflows:
- circuits-wasm-linux-clang
- l1-contracts
<<: *defaults
- yarn-project-format:
- yarn-project:
requires:
- yarn-project
- yarn-project-base
- noir-contracts-build
<<: *defaults
- yarn-project-test:
- yarn-project-formatting:
requires:
- yarn-project
<<: *defaults
- yarn-project:
- yarn-project-tests:
requires:
- yarn-project-base
- noir-contracts-build
- yarn-project
<<: *defaults

- end-to-end: *yarn_project
Expand Down
7 changes: 5 additions & 2 deletions barretenberg/cpp/dockerfiles/Dockerfile.wasm-linux-clang
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ WORKDIR /usr/src/barretenberg/cpp
COPY ./scripts/install-wasi-sdk.sh ./scripts/install-wasi-sdk.sh
RUN ./scripts/install-wasi-sdk.sh
COPY . .
RUN cmake --preset wasm && cmake --build --preset wasm
RUN cmake --preset wasm-threads && cmake --build --preset wasm-threads
# Building both wasm's in parallel reduces build from 120s to 80s.
RUN (cmake --preset wasm && cmake --build --preset wasm) & \
(cmake --preset wasm-threads && cmake --build --preset wasm-threads) & \
wait


FROM scratch
WORKDIR /usr/src/barretenberg/cpp
Expand Down
3 changes: 1 addition & 2 deletions bootstrap_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
set -e

PROJECT_NAME=${1:-}
COMMIT_HASH=$(git rev-parse HEAD)

if [ -z "$PROJECT_NAME" ]; then
echo "usage: $0 <project_name>"
Expand All @@ -31,7 +30,7 @@ fi

cd "$(dirname "$0")"

source ./build-system/scripts/setup_env $COMMIT_HASH '' mainframe_$USER > /dev/null
source ./build-system/scripts/setup_env '' '' mainframe_$USER > /dev/null
build_local $PROJECT_NAME

if [ -z "$PROJECT_NAME" ]; then
Expand Down
63 changes: 7 additions & 56 deletions build-system/scripts/build
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ function try_fetch_image() {
return 0
}

ecr_login

# Ensure ECR repository exists.
# Login to ECR and ensure repository exists.
retry ensure_repo $REPOSITORY $ECR_REGION refresh_lifecycle

CONTENT_HASH=$(calculate_content_hash $REPOSITORY)
Expand All @@ -78,9 +76,9 @@ fi
echo "Initializing submodules..."
init_submodules $REPOSITORY

echo "Checking for terraform..."
# Validate any terraform if it exists.
if [ -d $ROOT_PATH/$PROJECT_DIR/terraform ]; then
echo "Checking terraform..."
ensure_terraform
export TF_IN_AUTOMATION=1
pushd $ROOT_PATH/$PROJECT_DIR/terraform
Expand All @@ -95,18 +93,8 @@ if [ -d $ROOT_PATH/$PROJECT_DIR/terraform ]; then
popd
fi

# Pull latest parents that are not ours. We also do not want to pull images suffixed by _, this is how we scope intermediate build images.
PARENTS=$(cat $DOCKERFILE | sed -n -e 's/^FROM \([^[:space:]]\+\).*/\1/p' | sed '/_$/d' | { grep -v $ECR_DEPLOY_URL || true; } | sort | uniq)
for PARENT in $PARENTS; do
[ "$PARENT" == "scratch" ] && continue
fetch_image $PARENT
done

# For each parent that's ours, pull in the latest image.
PARENTS=$(cat $DOCKERFILE | sed -n -e "s/^FROM $ECR_DEPLOY_URL\/\([^[:space:]]\+\).*/\1/p")
for PARENT in $PARENTS; do
# Extract repository name (i.e. discard tag).
PARENT_REPO=${PARENT%:*}
# For each dependency, pull in the latest image and give it correct tag.
for PARENT_REPO in $(query_manifest dependencies $REPOSITORY); do
PARENT_CONTENT_HASH=$(calculate_content_hash $PARENT_REPO)
# There must be a parent image to continue.
if [ -z "$PARENT_CONTENT_HASH" ]; then
Expand All @@ -117,56 +105,19 @@ for PARENT in $PARENTS; do
echo "Pulling dependency $PARENT_REPO..."
fetch_image $PARENT_IMAGE_URI
# Tag it to look like an official release as that's what we use in Dockerfiles.
TAG=$ECR_DEPLOY_URL/$PARENT
TAG=$ECR_DEPLOY_URL/$PARENT_REPO
retry docker tag $PARENT_IMAGE_URI $TAG
done

echo "Extracting commit tag version..."
COMMIT_TAG_VERSION=$(extract_tag_version $REPOSITORY false)

# Pull, build and push each named stage to cache.
STAGE_CACHE_FROM=""
CACHE_FROM=""
STAGES=$(cat $DOCKERFILE | sed -n -e 's/^FROM .* AS \(.*\)/\1/p')
for STAGE in $STAGES; do
# Get the last build of this stage to leverage layer caching.
if [ -n "$CONTENT_HASH" ]; then
echo "Pulling stage: $STAGE"
STAGE_IMAGE_LAST_URI=$ECR_URL/$REPOSITORY:cache-$CONTENT_HASH-$STAGE
if try_fetch_image $STAGE_IMAGE_LAST_URI; then
STAGE_CACHE_FROM="--cache-from $STAGE_IMAGE_LAST_URI"
fi
fi

echo "Building stage: $STAGE"
STAGE_IMAGE_COMMIT_URI=$ECR_URL/$REPOSITORY:cache-$CONTENT_HASH-$STAGE
# Build our dockerfile, add timing information
docker build --target $STAGE $STAGE_CACHE_FROM -t $STAGE_IMAGE_COMMIT_URI -f $DOCKERFILE --build-arg COMMIT_TAG=$COMMIT_TAG_VERSION --build-arg ARG_CONTENT_HASH=$CONTENT_HASH .

# We don't want to have redo this stages work when building the final image. Use it as a layer cache.
CACHE_FROM="--cache-from $STAGE_IMAGE_COMMIT_URI $CACHE_FROM"

echo "Pushing stage: $STAGE"
retry docker push $STAGE_IMAGE_COMMIT_URI > /dev/null 2>&1
echo
done

# Pull previous image to use it as a layer cache if it exists, and if we have not manually ran.
if [ -n "$COMMIT_HASH" ]; then
LAST_SUCCESSFUL_URI=$ECR_URL/$REPOSITORY:cache-$CONTENT_HASH
echo "Pulling previous build of $REPOSITORY..."
if try_fetch_image $LAST_SUCCESSFUL_URI ; then
CACHE_FROM="--cache-from $LAST_SUCCESSFUL_URI $CACHE_FROM"
fi
echo
fi
echo "Commit tag version: $COMMIT_TAG_VERSION"

# Build the actual image and give it a commit tag.
IMAGE_COMMIT_URI=$ECR_URL/$REPOSITORY:cache-$CONTENT_HASH
if [[ -n "$ARCH" ]]; then
IMAGE_COMMIT_URI=$IMAGE_COMMIT_URI-$ARCH
fi
echo "Building image: $IMAGE_COMMIT_URI"
docker build -t $IMAGE_COMMIT_URI -f $DOCKERFILE $CACHE_FROM --build-arg COMMIT_TAG=$COMMIT_TAG_VERSION --build-arg ARG_CONTENT_HASH=$CONTENT_HASH .
docker build -t $IMAGE_COMMIT_URI -f $DOCKERFILE --build-arg COMMIT_TAG=$COMMIT_TAG_VERSION --build-arg ARG_CONTENT_HASH=$CONTENT_HASH .
echo "Pushing image: $IMAGE_COMMIT_URI"
retry docker push $IMAGE_COMMIT_URI > /dev/null 2>&1
23 changes: 19 additions & 4 deletions build-system/scripts/build_local
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fi
if [ -n "$ONLY_TARGET" ]; then
DEPS=("$TARGET_PROJECT")
else
DEPS=($(query_manifest dependencies $TARGET_PROJECT))
DEPS=($(query_manifest allDependencies $TARGET_PROJECT))
fi
declare -a PROJECTS
for DEP in ${DEPS[@]}; do
Expand Down Expand Up @@ -63,15 +63,30 @@ for E in "${PROJECTS[@]}"; do
fi
fi

IMAGE_URI=$(calculate_image_uri $REPO)
ARR=(${IMAGE_URI//:/ })
REPO=${ARR[0]}
TAG=${ARR[1]}

echo
echo
echo
echo "*** Building $PROJECT_DIR_NAME:$DOCKERFILE -> $REPO ***"
echo "*** Repository: $REPO"
echo "*** Tag: $TAG"
echo "*** Dockerfile: $DOCKERFILE"
echo "*** Context: $PWD"
echo

docker build ${ADDITIONAL_ARGS:-} --build-arg ARG_COMMIT_HASH=$COMMIT_HASH -f $DOCKERFILE -t $ECR_DEPLOY_URL/$REPO:latest .
docker tag $ECR_DEPLOY_URL/$REPO:latest aztecprotocol/$REPO:latest
if docker image ls --format "{{.Repository}}:{{.Tag}}" | grep -q -w $IMAGE_URI; then
echo "Image exists locally. Skipping."
else
if ecr_login && image_exists $REPO $TAG ; then
docker pull $IMAGE_URI
else
docker build ${ADDITIONAL_ARGS:-} --build-arg ARG_COMMIT_HASH=$COMMIT_HASH -f $DOCKERFILE -t $IMAGE_URI .
docker tag $IMAGE_URI aztecprotocol/$REPO:latest
fi
fi

if [ "$PROJECT_DIR_NAME" = "$TARGET_PROJECT" ]; then
if [ -n "$LAUNCH" ]; then
Expand Down
10 changes: 10 additions & 0 deletions build-system/scripts/cond_spot_run_container
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
[ -n "${BUILD_SYSTEM_DEBUG:-}" ] && set -x # conditionally trace
set -eu

REPOSITORY=$1
CPUS=$2
shift 2

export TAG_POSTFIX=$JOB_NAME
cond_spot_run_script $REPOSITORY $CPUS cond_run_container $REPOSITORY $@
5 changes: 4 additions & 1 deletion build-system/scripts/query_manifest
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ case "$CMD" in
yq -r ".\"$REPO\".projectDir // .\"$REPO\".buildDir" $MANIFEST
;;
dependencies)
yq -r ".\"$REPO\".dependencies // [] | .[]" $MANIFEST
;;
allDependencies)
# Get dependencies for a given repo. Inclusive of repo itself.
# If a string, attempt to execute <projectDir>/<string> if exists to get dependencies, else error.
# If an array, the array lists the dependencies (excluding self).
Expand Down Expand Up @@ -102,7 +105,7 @@ case "$CMD" in
# If no rebuild patterns are given, the result is ["^<projectDir>/"].
# If a projects rebuildPattern is a string, the rebuild patterns are in <projectDir>/<string>.
# If an array, the array lists the rebuild patterns.
DEPS=($($0 dependencies $REPO))
DEPS=($($0 allDependencies $REPO))
PATTERNS=()
for DEP in "${DEPS[@]}"; do
add_rebuild_patterns $DEP
Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/setup_env
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ echo export ECR_DEPLOY_URL=278380418400.dkr.ecr.eu-west-2.amazonaws.com >> $BASH
echo export PROJECT=$PROJECT >> $BASH_ENV
echo export COMMIT_HASH=$COMMIT_HASH >> $BASH_ENV
echo export COMMIT_TAG=$COMMIT_TAG >> $BASH_ENV
echo "export COMMIT_MESSAGE='$COMMIT_MESSAGE'" >> $BASH_ENV
echo "export COMMIT_MESSAGE='${COMMIT_MESSAGE//\'/\'\\\'\'}'" >> $BASH_ENV
echo export JOB_NAME=$JOB_NAME >> $BASH_ENV
echo export GIT_REPOSITORY_URL=$GIT_REPOSITORY_URL >> $BASH_ENV
echo export VERSION_TAG=$VERSION_TAG >> $BASH_ENV
Expand Down
27 changes: 15 additions & 12 deletions build_manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,6 @@ circuits-x86_64-linux-clang-assert:
dependencies:
- barretenberg-x86_64-linux-clang

docs:
buildDir: .
dockerfile: docs/Dockerfile
rebuildPatterns:
- ^docs/
- ^.*.cpp$
- ^.*.ts$
- ^.release-please-manifest.json$
- ^.*/noir-version.json$

l1-contracts:
buildDir: l1-contracts

Expand All @@ -98,8 +88,6 @@ noir-contracts-build:
rebuildPatterns:
- ^yarn-project/noir-contracts/
- ^yarn-project/aztec-nr/
# Prevent automatic querying of get_dependencies.sh script. Needed because this looks like a yarn project.
dependencies: []

yarn-project-base:
buildDir: yarn-project
Expand All @@ -113,6 +101,9 @@ yarn-project-base:

yarn-project:
buildDir: yarn-project
rebuildPatterns:
- ^yarn-project/.*\\.(ts|js|cjs|mjs|json|html)$
- ^yarn-project/Dockerfile
dependencies:
- yarn-project-base
- noir-contracts-build
Expand Down Expand Up @@ -166,3 +157,15 @@ end-to-end:
projectDir: yarn-project/end-to-end
dependencies:
- yarn-project

docs:
buildDir: .
dockerfile: docs/Dockerfile
rebuildPatterns:
- ^docs/
- ^.*.cpp$
- ^.*.ts$
- ^.release-please-manifest.json$
- ^.*/noir-version.json$
dependencies:
- yarn-project
4 changes: 1 addition & 3 deletions docs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/yarn-project AS builder
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/yarn-project
WORKDIR /usr/src
COPY . .
WORKDIR /usr/src/yarn-project
RUN yarn build
WORKDIR /usr/src/docs
RUN yarn && yarn build
10 changes: 10 additions & 0 deletions docs/Dockerfile.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# The build context for docs is the root of the repository.
# Be very specific about what we include.
*

!docs
!l1-contracts/src
!l1-contracts/test
!barretenberg/cpp/src/barretenberg
!circuits/cpp/src
!.release-please-manifest.json
4 changes: 3 additions & 1 deletion yarn-project/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
**/*.tsbuildinfo
**/Dockerfile*
**/node_modules
Dockerfile

noir-contracts/src/types
noir-contracts/src/artifacts
noir-contracts/src/artifacts
noir-contracts/target
Loading