Skip to content

Commit

Permalink
test: optimise disk usage (#2012)
Browse files Browse the repository at this point in the history
* test: optimise disk usage

Signed-off-by: Matej Vasek <[email protected]>

* fixup: change tag

Signed-off-by: Matej Vasek <[email protected]>

* fixup: use create to build testing buildah image

Signed-off-by: Matej Vasek <[email protected]>

* fixup: install crane

Signed-off-by: Matej Vasek <[email protected]>

---------

Signed-off-by: Matej Vasek <[email protected]>
  • Loading branch information
matejvasek authored Oct 20, 2023
1 parent b246887 commit 6c6730f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Binary file added hack/allow-insecure.tar
Binary file not shown.
11 changes: 6 additions & 5 deletions hack/setup-testing-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ ko build --tags "latest" -B ./cmd/func

# Build custom buildah image for tests.
# This image will accept registries ending with .cluster.local as insecure (non-TLS).
docker build . -f - -t localhost:50000/buildah/stable:v1.31.0 <<EOF
FROM quay.io/buildah/stable:v1.31.0
RUN echo -e '\n[[registry]]\nprefix = "*.cluster.local"\ninsecure = true' >> '/etc/containers/registries.conf'
EOF
docker push localhost:50000/buildah/stable:v1.31.0
go install github.com/google/go-containerregistry/cmd/crane@latest
crane append --base=quay.io/buildah/stable:v1.31.0 \
--new_layer="$(dirname "$0")/allow-insecure.tar" \
--new_tag=quay.io/buildah/stable:v1.31.0 \
--output=/dev/stdout | \
docker exec -i func-control-plane ctr -n=k8s.io images import -

0 comments on commit 6c6730f

Please sign in to comment.