diff --git a/ci/cluster-api/vsphere/templates/cluster.yaml b/ci/cluster-api/vsphere/templates/cluster.yaml index 5039fde4741..df47fd3c77e 100644 --- a/ci/cluster-api/vsphere/templates/cluster.yaml +++ b/ci/cluster-api/vsphere/templates/cluster.yaml @@ -45,7 +45,7 @@ spec: cloneMode: linkedClone datacenter: DATACENTERNAME datastore: DATASTORENAME - diskGiB: 25 + diskGiB: 50 folder: FOLDERENAME memoryMiB: 8192 network: diff --git a/ci/jenkins/test-vmc.sh b/ci/jenkins/test-vmc.sh index 1ce62dfe891..73e6989630a 100755 --- a/ci/jenkins/test-vmc.sh +++ b/ci/jenkins/test-vmc.sh @@ -301,6 +301,22 @@ function copy_image { ${SSH_WITH_ANTREA_CI_KEY} -n capv@${IP} "sudo crictl images | grep '' | awk '{print \$3}' | xargs -r crictl rmi" } +function copy_test_image { + image=$1 + tag=$2 + + docker pull ${image} && docker save -o image.tar ${image} + + for IP in "${IPs[@]}"; do + echo "Processing image on node: $IP" + ${SCP_WITH_ANTREA_CI_KEY} image.tar capv@${IP}:/home/capv + ${SSH_WITH_ANTREA_CI_KEY} -n capv@${IP} "sudo ctr -n=k8s.io images import /home/capv/image.tar" + if [ -n "$tag" ]; then + ${SSH_WITH_ANTREA_CI_KEY} -n capv@${IP} "sudo ctr -n=k8s.io images tag $image $tag --force" + fi + done +} + # We run the function in a subshell with "set -e" to ensure that it exits in # case of error (e.g. integrity check), no matter the context in which the # function is called. @@ -431,6 +447,16 @@ function deliver_antrea { ${SCP_WITH_ANTREA_CI_KEY} $GIT_CHECKOUT_DIR/build/yamls/*.yml capv@${control_plane_ip}:~ IPs=($(kubectl get nodes -o wide --no-headers=true | awk '{print $6}' | xargs)) + antrea_images=("registry.k8s.io/e2e-test-images/agnhost:2.40" "antrea/nginx:1.21.6-alpine" "antrea/sonobuoy:v0.56.16" "antrea/toolbox:1.3-0" "antrea/systemd-logs:v0.4") + k8s_images=("registry.k8s.io/e2e-test-images/agnhost:2.45" "registry.k8s.io/e2e-test-images/jessie-dnsutils:1.5" "registry.k8s.io/e2e-test-images/nginx:1.14-2") + e2e_images=("k8sprow.azurecr.io/kubernetes-e2e-test-images/agnhost:2.45" "k8sprow.azurecr.io/kubernetes-e2e-test-images/jessie-dnsutils:1.5" "k8sprow.azurecr.io/kubernetes-e2e-test-images/nginx:1.14-2") + for image in "${antrea_images[@]}"; do + copy_test_image ${image} + done + for k in "${!k8s_images[@]}"; do + copy_test_image ${k8s_images[$k]} ${e2e_images[$k]} + done + for i in "${!IPs[@]}" do ssh-keygen -f "/var/lib/jenkins/.ssh/known_hosts" -R ${IPs[$i]} diff --git a/ci/run-k8s-e2e-tests.sh b/ci/run-k8s-e2e-tests.sh index 4652aa7b2f1..abc611238b5 100755 --- a/ci/run-k8s-e2e-tests.sh +++ b/ci/run-k8s-e2e-tests.sh @@ -41,7 +41,7 @@ DEFAULT_E2E_SIG_NETWORK_SKIP="\[Slow\]|\[Serial\]|\[Disruptive\]|\[GCE\]|\[Featu MODE="report" THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" KUBE_CONFORMANCE_IMAGE_VERSION_OPTION="" -IMAGE_PULL_POLICY="Always" +IMAGE_PULL_POLICY="IfNotPresent" CONFORMANCE_IMAGE_CONFIG_PATH="${THIS_DIR}/conformance-image-config.yaml" SONOBUOY_IMAGE="antrea/sonobuoy:v0.56.16" SYSTEMD_LOGS_IMAGE="antrea/systemd-logs:v0.4"