Skip to content

Commit 636f63d

Browse files
authored
Fix Multi-cluster coverage build with no space left issue (#7652)
No space left issue on /tmp was observed when running Multi-cluster e2e: `mkdir /tmp/go-build2473123557/b1104/: no space left on device` Fix it by mounting cache instead of writing files to /tmp Signed-off-by: Lan Luo <[email protected]>
1 parent 76d5b16 commit 636f63d

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

ci/jenkins/test-mc.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -405,16 +405,16 @@ function run_multicluster_e2e {
405405

406406
# Use the same agnhost image which is defined as 'agnhostImage' in antrea/test/e2e/framework.go to
407407
# avoid pulling the image again when running Multi-cluster e2e tests.
408-
docker pull "registry.k8s.io/e2e-test-images/agnhost:2.29"
409-
docker save "registry.k8s.io/e2e-test-images/agnhost:2.29" -o "${WORKDIR}"/agnhost.tar
408+
docker pull "registry.k8s.io/e2e-test-images/agnhost:2.40"
409+
docker save "registry.k8s.io/e2e-test-images/agnhost:2.40" -o "${WORKDIR}"/agnhost.tar
410410

411411
if [[ ${KIND} == "true" ]]; then
412412
for name in ${CLUSTER_NAMES[*]}; do
413413
if [[ "${name}" == "leader" ]];then
414414
continue
415415
fi
416416
kind load docker-image "${DOCKER_REGISTRY}"/antrea/nginx:1.21.6-alpine --name ${name}
417-
kind load docker-image "registry.k8s.io/e2e-test-images/agnhost:2.29" --name ${name}
417+
kind load docker-image "registry.k8s.io/e2e-test-images/agnhost:2.40" --name ${name}
418418
done
419419
else
420420
for kubeconfig in "${membercluster_kubeconfigs[@]}"; do

multicluster/build/images/Dockerfile.build.coverage

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,16 @@ WORKDIR /antrea
1919

2020
COPY go.mod /antrea/go.mod
2121

22-
RUN go mod download
22+
RUN --mount=type=cache,target=/go/pkg/mod/ \
23+
--mount=type=bind,source=go.sum,target=go.sum \
24+
--mount=type=bind,source=go.mod,target=go.mod \
25+
go mod download
2326

2427
COPY . /antrea
2528

26-
RUN cd multicluster && make antrea-mc-instr-binary
29+
RUN --mount=type=cache,target=/go/pkg/mod/ \
30+
--mount=type=cache,target=/root/.cache/go-build/ \
31+
cd multicluster && make antrea-mc-instr-binary
2732

2833
FROM ubuntu:24.04
2934

0 commit comments

Comments
 (0)