Skip to content

Commit af90cc9

Browse files
committed
[CI] Add docker-containerd-linux-x86-64 integration test in Prow
1 parent bac7021 commit af90cc9

File tree

4 files changed

+53
-2
lines changed

4 files changed

+53
-2
lines changed

deploy/kicbase/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,10 @@ RUN install -m 0755 -d /etc/apt/keyrings \
172172
tee /etc/apt/sources.list.d/docker.list > /dev/null \
173173
&& clean-install docker-ce docker-ce-cli containerd.io docker-buildx-plugin
174174

175+
# Set ulimit for containerd to match docker's default-ulimit setting
176+
# This ensures consistent file descriptor limits (1048576) across container runtimes
177+
RUN sed -i '/^\[Service\]/a LimitNOFILE=1048576' /lib/systemd/system/containerd.service
178+
175179
# install buildkit
176180
RUN export ARCH=$(dpkg --print-architecture | sed 's/ppc64el/ppc64le/' | sed 's/armhf/arm-v7/') \
177181
&& echo "Installing buildkit ..." \
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/bin/bash
2+
3+
# Copyright 2025 The Kubernetes Authors All rights reserved.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
set -e
18+
set -x
19+
20+
OS="linux"
21+
ARCH="amd64"
22+
DRIVER="docker"
23+
CONTAINER_RUNTIME="containerd"
24+
EXTRA_START_ARGS=""
25+
EXTRA_TEST_ARGS=""
26+
JOB_NAME="Docker_Containerd_Linux_x86-64"
27+
28+
git config --global --add safe.directory '*'
29+
COMMIT=$(git rev-parse HEAD)
30+
MINIKUBE_LOCATION=$COMMIT
31+
32+
33+
# when docker is the driver, we run integration tests directly in prow cluster
34+
# by default, prow jobs run in root, so we must switch to a non-root user to run docker driver
35+
36+
37+
source ./hack/prow/common.sh

hack/prow/prow.mk

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ integration-prow-docker-docker-linux-x86-64:
77
./hack/prow/minikube_cross_build.sh $(GO_VERSION) linux amd64
88
./hack/prow/util/integration_prow_wrapper.sh ./hack/prow/integration_docker_docker_linux_x86-64.sh
99

10+
integration-prow-docker-containerd-linux-x86-64:
11+
# build first
12+
# container-runtime=containerd driver=docker on linux/amd64
13+
./hack/prow/minikube_cross_build.sh $(GO_VERSION) linux amd64
14+
./hack/prow/util/integration_prow_wrapper.sh ./hack/prow/integration_docker_containerd_linux_x86-64.sh
15+
1016
integration-prow-kvm-docker-linux-x86-64:
1117
# build first
1218
# container-runtime=docker driver=kvm on linux/amd64

hack/prow/util/integration_prow_wrapper.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ echo "test finished with exit code $result"
2424

2525
items=("testout.txt" "test.json" "junit-unit.xml" "test.html" "test_summary.json")
2626
for item in "${items[@]}"; do
27-
echo "Collecting ${item} to ${ARTIFACTS}/${item}"
28-
cp "${item}" "${ARTIFACTS}/${item}"
27+
if [ -f "${item}" ]; then
28+
echo "Collecting ${item} to ${ARTIFACTS}/${item}"
29+
cp "${item}" "${ARTIFACTS}/${item}"
30+
else
31+
echo "Warning: ${item} not found, skipping"
32+
fi
2933
done
3034
exit $result

0 commit comments

Comments
 (0)