From 5619d2ed16525f838780586f9dbc87a5cbeefdb8 Mon Sep 17 00:00:00 2001 From: Hanlin Shi Date: Fri, 24 Feb 2023 11:42:32 -0800 Subject: [PATCH 1/2] Test against latest stable k8s in e2e kind test Signed-off-by: Hanlin Shi --- ci/pull_e2e_kind.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/pull_e2e_kind.groovy b/ci/pull_e2e_kind.groovy index 8f2d5b2d14..a90457e3b3 100644 --- a/ci/pull_e2e_kind.groovy +++ b/ci/pull_e2e_kind.groovy @@ -354,7 +354,7 @@ try { cat /etc/docker/daemon.json || true E2E=y NO_BUILD=y DOCKER_REPO=hub.pingcap.net/tidb-operator-e2e IMAGE_TAG=${IMAGE_TAG} make docker-push e2e-docker-push echo "info: download binaries for e2e" - E2E=y SKIP_BUILD=y SKIP_IMAGE_BUILD=y SKIP_UP=y SKIP_TEST=y SKIP_DOWN=y ./hack/e2e.sh + KUBE_VERSION=\$(curl https://storage.googleapis.com/kubernetes-release/release/stable.txt) E2E=y SKIP_BUILD=y SKIP_IMAGE_BUILD=y SKIP_UP=y SKIP_TEST=y SKIP_DOWN=y ./hack/e2e.sh echo "info: change ownerships for jenkins" # we run as root in our pods, this is required # otherwise jenkins agent will fail because of the lack of permission @@ -368,7 +368,7 @@ try { } } - def GLOBALS = "KIND_DATA_HOSTPATH=/kind-data KIND_ETCD_DATADIR=/mnt/tmpfs/etcd E2E=y SKIP_BUILD=y SKIP_IMAGE_BUILD=y DOCKER_REPO=hub.pingcap.net/tidb-operator-e2e IMAGE_TAG=${IMAGE_TAG} DELETE_NAMESPACE_ON_FAILURE=${params.DELETE_NAMESPACE_ON_FAILURE} GINKGO_NO_COLOR=y" + def GLOBALS = "KUBE_VERSION=\$(curl https://storage.googleapis.com/kubernetes-release/release/stable.txt) KIND_DATA_HOSTPATH=/kind-data KIND_ETCD_DATADIR=/mnt/tmpfs/etcd E2E=y SKIP_BUILD=y SKIP_IMAGE_BUILD=y DOCKER_REPO=hub.pingcap.net/tidb-operator-e2e IMAGE_TAG=${IMAGE_TAG} DELETE_NAMESPACE_ON_FAILURE=${params.DELETE_NAMESPACE_ON_FAILURE} GINKGO_NO_COLOR=y" build("tidb-operator", "${GLOBALS} GINKGO_NODES=${params.GINKGO_NODES} ./hack/e2e.sh -- ${params.E2E_ARGS}") if (GIT_REF ==~ /^(master|)$/ || GIT_REF ==~ /^(release-.*)$/ From 1ce2f88e52babf79fe948d121533d9961e4e8c6b Mon Sep 17 00:00:00 2001 From: Hanlin Shi Date: Fri, 24 Feb 2023 12:17:24 -0800 Subject: [PATCH 2/2] Use latest stable k8s version in e2e kind tests Signed-off-by: Hanlin Shi --- ci/e2e_kind.groovy | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ci/e2e_kind.groovy b/ci/e2e_kind.groovy index b5d9f40264..f0a933d3cd 100644 --- a/ci/e2e_kind.groovy +++ b/ci/e2e_kind.groovy @@ -166,6 +166,7 @@ pipeline { echo "env.WORKSPACE: ${env.WORKSPACE}" echo "GIT_REF: ${GIT_REF}" echo "ARTIFACTS: ${ARTIFACTS}" + echo "KUBE_VERSION: $(curl https://storage.googleapis.com/kubernetes-release/release/stable.txt)" } } @@ -209,6 +210,7 @@ pipeline { export DELETE_NAMESPACE_ON_FAILURE=${params.DELETE_NAMESPACE_ON_FAILURE} export ARTIFACTS=${ARTIFACTS} export GINKGO_NO_COLOR=y + export KUBE_VERSION=$(curl https://storage.googleapis.com/kubernetes-release/release/stable.txt) echo "info: begin to run e2e" ./hack/e2e.sh -- ${params.E2E_ARGS} """