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

fix(ci): boxes #10895

Merged
merged 3 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
2 changes: 1 addition & 1 deletion bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ case "$cmd" in
;;
"test-boxes")
github_group "test-boxes"
bootstrap_local "CI=1 SKIP_BB_CRS=1 ./bootstrap.sh fast && ./boxes/bootstrap.sh test";
bootstrap_local_noninteractive "CI=1 SKIP_BB_CRS=1 ./bootstrap.sh fast && ./boxes/bootstrap.sh test";
exit
;;
"image-aztec")
Expand Down
31 changes: 31 additions & 0 deletions ci3/bootstrap_local_noninteractive
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash
# Launches our CI image locally and runs the bootstrap.
# This is used interim while we have CI runners that are not launched with bootstrap_ec2.
# It uses docker-in-docker as some test flows require it (e.g. e2e).
# We use a volume on /var/lib/docker as overlayfs trashes performance (in fact it just breaks).
# We mount in aws credentials to leverage the s3 cache.
# The host repository is mounted in read-only, and a clone is taken to ensure a clean start.
# If anything goes wrong during the run, the container will drop into a shell.

root=$(git rev-parse --show-toplevel)
source $root/ci3/source
current_commit=$(git rev-parse HEAD)
cmd=${1:-"CI=1 ./bootstrap.sh fast"}

interactive_args=""
docker run $interactive_args --rm \
--privileged \
-v bootstrap_ci_local_docker:/var/lib/docker \
-v $root:/aztec-packages-host:ro \
-v $HOME/.aws:/root/.aws \
aztecprotocol/ci:2.0 bash -c "
/usr/local/share/docker-init.sh &> /dev/null
git config --global --add safe.directory /aztec-packages-host/.git
mkdir -p /root/aztec-packages && cd /root/aztec-packages
# Ensure we get a clean clone of the repo.
git init &>/dev/null
git remote add origin https://github.com/aztecprotocol/aztec-packages
git fetch --depth 1 origin $current_commit 2>/dev/null || (echo 'The commit was not pushed, run aborted.' && exit 1)
git checkout FETCH_HEAD &>/dev/null
$cmd
"
Loading