Skip to content

Commit

Permalink
fix hosed BK and test scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
dubo-dubon-duponey committed Mar 14, 2024
1 parent 98a90a7 commit 7d0560b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
7 changes: 3 additions & 4 deletions hack/helpers/start-buildkit.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
#!/usr/bin/env bash
set -o errexit -o errtrace -o functrace -o nounset -o pipefail

export SUITE=bookworm
export DATE=2024-02-20

readonly IMAGE_BLDKT="${IMAGE_BLDKT:-docker.io/dubodubonduponey/buildkit:$SUITE-$DATE}"
export TAG=latest
readonly IMAGE_BLDKT="${IMAGE_BLDKT:-docker.io/dubodubonduponey/buildkit:$TAG}"

setup::buildkit() {
[ "$(docker container inspect -f '{{.State.Running}}' dbdbdp-buildkit 2>/dev/null)" == "true" ] || {
Expand All @@ -20,6 +18,7 @@ setup::buildkit() {
--privileged \
"$IMAGE_BLDKT"
docker exec --env QEMU_BINARY_PATH=/boot/bin/ dbdbdp-buildkit binfmt --install all
docker exec dbdbdp-buildkit mkdir /tmp/runtime
}
}

Expand Down
8 changes: 5 additions & 3 deletions hack/test.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
#!/usr/bin/env bash
set -o errexit -o errtrace -o functrace -o nounset -o pipefail

# shellcheck source=/dev/null
root="$(cd "$(dirname "${BASH_SOURCE[0]:-$PWD}")" 2>/dev/null 1>&2 && pwd)/../"
readonly root

export BUILDKIT_HOST="$("$root/hack/helpers/start-buildkit.sh")"

# Simple no-thrill build tester
# XXX Currently reduced to a single architecture to avoid using all disk space until we figure out our space efficiency problem (likely the fat builder image getting duplicated over and over)
# Solution would probably be to do like buildkit and fetch with a lightweight go image while build mount from the previous stage instead of inheriting - annoying but probably the only way
if ! "$root/hack/build.sh" \
--inject registry="docker.io/dubodubonduponey" \
--inject progress=plain \
--inject date=2022-12-01 \
--inject suite=bullseye \
--inject date=2024-02-20 \
--inject suite=bookworm \
--inject platforms=linux/arm64 \
"image" "$@"; then
printf >&2 "Failed building\n"
Expand Down

0 comments on commit 7d0560b

Please sign in to comment.