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: avoid using builder cache in integration tests #162

Merged
Merged
Changes from all 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
11 changes: 10 additions & 1 deletion hack/ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,21 @@ set -x
VERSION=$(git rev-parse --short HEAD)
IMG=docker.io/warmmetal/container-image-csi-driver:${VERSION}
BUILDER=$(docker buildx ls | grep ci-builderx || true)
[ "${BUILDER}" != "" ] || docker buildx create \

if [ "${BUILDER}" != "" ]; then
docker buildx rm ci-builderx
fi

docker buildx create \
--name ci-builderx --driver docker-container \
--bootstrap \
--driver-opt image=moby/buildkit:master,network=host

docker buildx use ci-builderx
docker buildx build -t ${IMG} -o "type=oci,dest=container-image-csi-driver.tar" .
kind load image-archive container-image-csi-driver.tar -n kind-${GITHUB_RUN_ID}
docker buildx build --target install-util -o "type=local,dest=_output/" .

# Cleanup builder to avoid caching issues
docker buildx rm ci-builderx
set +e