Skip to content

Commit

Permalink
fix: avoid using builder cache in integration tests (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
mugdha-adhav authored Aug 29, 2024
1 parent 4c1e524 commit a30f32f
Showing 1 changed file with 10 additions and 1 deletion.
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

0 comments on commit a30f32f

Please sign in to comment.