Skip to content

Commit

Permalink
Do not load unnecessary images in ci/kind/test-upgrade-antrea.sh (#6039)
Browse files Browse the repository at this point in the history
In particular, when testing upgrade from a minor version already using
split images (e.g., 1.15.0), we should not pull the unified image and
load it into the K8s Nodes, as it won't be used.

This should help reduce disk usage of the Kind cluster in CI.

Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
  • Loading branch information
antoninbas authored Mar 1, 2024
1 parent 50bafd7 commit bb62300
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion ci/kind/test-upgrade-antrea.sh
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,18 @@ fi

echo "Running upgrade test for tag $FROM_TAG"

DOCKER_IMAGES=("busybox" "projects.registry.vmware.com/antrea/antrea-ubuntu:$FROM_TAG")
function version_lt() { test "$(printf '%s\n' "$@" | sort -rV | head -n 1)" != "$1"; }

DOCKER_IMAGES=()
if version_lt "$FROM_TAG" v1.15; then
DOCKER_IMAGES+=("projects.registry.vmware.com/antrea/antrea-ubuntu:$FROM_TAG")
else
DOCKER_IMAGES+=("projects.registry.vmware.com/antrea/antrea-agent-ubuntu:$FROM_TAG" \
"projects.registry.vmware.com/antrea/antrea-controller-ubuntu:$FROM_TAG")
fi

# Silence CLI suggestions.
export DOCKER_CLI_HINTS=false
for img in "${DOCKER_IMAGES[@]}"; do
echo "Pulling $img"
for i in `seq 3`; do
Expand Down

0 comments on commit bb62300

Please sign in to comment.