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

CI: explicitly specify pause image name #1695

Merged
merged 2 commits into from
Jun 2, 2024
Merged
Show file tree
Hide file tree
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
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
Loading