Skip to content

Commit

Permalink
Merge pull request #1695 from ktock/ci-fix-2.0
Browse files Browse the repository at this point in the history
CI: explicitly specify pause image name
  • Loading branch information
AkihiroSuda committed Jun 2, 2024
2 parents 4c63858 + bce34f2 commit dc0ff53
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ ARG NETAVARK_VERSION=v1.10.3

ARG CONTAINERIZED_SYSTEMD_VERSION=v0.1.1
ARG SLIRP4NETNS_VERSION=v1.3.0
ARG PAUSE_IMAGE_NAME_TEST=registry.k8s.io/pause:3.10

# Used in CI
ARG CRI_TOOLS_VERSION=v1.30.0
Expand Down
7 changes: 6 additions & 1 deletion script/cri-containerd/test-legacy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,17 @@
set -euo pipefail

CONTEXT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )/"
REPO="${CONTEXT}../../"
CONTAINERD_SOCK=unix:///run/containerd/containerd.sock
SNAPSHOTTER_SOCK=unix:///run/containerd-stargz-grpc/containerd-stargz-grpc.sock

source "${CONTEXT}/const.sh"
source "${REPO}/script/util/utils.sh"

IMAGE_LIST="${1}"

PAUSE_IMAGE_NAME=$(get_version_from_arg "${REPO}/Dockerfile" "PAUSE_IMAGE_NAME_TEST")

LOG_TMP=$(mktemp)
LIST_TMP=$(mktemp)
function cleanup {
Expand Down Expand Up @@ -67,7 +71,8 @@ fi
# Dump all names of images used in the test
docker exec -i "${TEST_NODE_ID}" journalctl -xu containerd > "${LOG_TMP}"
cat "${LOG_TMP}" | grep PullImage | sed -E 's/.*PullImage \\"([^\\]*)\\".*/\1/g' > "${LIST_TMP}"
cat "${LOG_TMP}" | grep SandboxImage | sed -E 's/.*SandboxImage:([^ ]*).*/\1/g' >> "${LIST_TMP}"
cat "${LOG_TMP}" | grep SandboxImage | sed -E 's/.*SandboxImage:([^ ]*).*/\1/g' >> "${LIST_TMP}" || true
echo ${PAUSE_IMAGE_NAME} >> "${LIST_TMP}"
cat "${LIST_TMP}" | sort | uniq > "${IMAGE_LIST}"

docker kill "${TEST_NODE_ID}"
Expand Down
3 changes: 3 additions & 0 deletions script/cri-containerd/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ source "${REPO}/script/util/utils.sh"

CNI_PLUGINS_VERSION=$(get_version_from_arg "${REPO}/Dockerfile" "CNI_PLUGINS_VERSION")
CRI_TOOLS_VERSION=$(get_version_from_arg "${REPO}/Dockerfile" "CRI_TOOLS_VERSION")
PAUSE_IMAGE_NAME=$(get_version_from_arg "${REPO}/Dockerfile" "PAUSE_IMAGE_NAME_TEST")
GINKGO_VERSION=v1.16.5

if [ "${CRI_NO_RECREATE:-}" != "true" ] ; then
Expand Down Expand Up @@ -58,6 +59,8 @@ version = 2
[debug]
format = "json"
level = "debug"
[plugins."io.containerd.grpc.v1.cri"]
sandbox_image = "${PAUSE_IMAGE_NAME}"
[plugins."io.containerd.grpc.v1.cri".containerd]
default_runtime_name = "runc"
snapshotter = "stargz"
Expand Down

0 comments on commit dc0ff53

Please sign in to comment.