From 57386136d8d0027b0b834047ce059a8bcae62cf4 Mon Sep 17 00:00:00 2001 From: Shiming Zhang Date: Wed, 20 Sep 2023 16:49:37 +0800 Subject: [PATCH 1/2] Bump kwokctl Signed-off-by: Shiming Zhang (cherry picked from commit 2b7381dae4dd7c4cffc4049f1c68a7e44d405ec5) Signed-off-by: Iceber Gu --- .github/workflows/ci.yml | 7 ++++++ test/environments/default.env.sh | 1 + test/environments/multiple.env.sh | 12 +++++++--- test/helper.sh | 37 ++++++++++++------------------- test/test.sh | 4 ++++ 5 files changed, 35 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 99a125c5c..7d01a6290 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -78,3 +78,10 @@ jobs: fetch-depth: 0 - name: Run e2e test run: ./test/test.sh + + - name: Upload logs + uses: actions/upload-artifact@v3 + if: failure() + with: + name: e2e-logs-${{ github.run_id }} + path: ${{ github.workspace }}/test/logs-* diff --git a/test/environments/default.env.sh b/test/environments/default.env.sh index 9ff07e815..b944ea002 100755 --- a/test/environments/default.env.sh +++ b/test/environments/default.env.sh @@ -25,6 +25,7 @@ create_data_plane data-v1-23 v1.23.4 || { echo "Failed to create data plane" exit 1 } + "${ROOT}/hack/gen-clusterconfigs.sh" "${cases}" diff --git a/test/environments/multiple.env.sh b/test/environments/multiple.env.sh index 3289e4fd4..737a9569f 100755 --- a/test/environments/multiple.env.sh +++ b/test/environments/multiple.env.sh @@ -11,9 +11,14 @@ cases="${1}" source "$(dirname "${BASH_SOURCE[0]}")/../helper.sh" releases=( - v1.23.5 - v1.22.8 - v1.21.11 + v1.28.2 + v1.27.6 + v1.26.9 + v1.25.14 + v1.24.15 + v1.23.17 + v1.22.17 + v1.21.14 v1.20.15 v1.19.16 v1.18.20 @@ -46,6 +51,7 @@ for release in "${releases[@]}"; do exit 1 } done + "${ROOT}/hack/gen-clusterconfigs.sh" "${cases}" diff --git a/test/helper.sh b/test/helper.sh index ea84b6d0d..abdab3c84 100755 --- a/test/helper.sh +++ b/test/helper.sh @@ -60,6 +60,7 @@ function create_cluster() { # delete the kind cluster function delete_cluster() { local name="${1:-kind}" + kind export logs --name "${name}" "${ROOT}/test/logs/kind/${name}" kind delete cluster --name "${name}" } @@ -127,7 +128,7 @@ function install_kwokctl() { if cmd_exist kwokctl; then return 0 fi - wget "https://github.com/kubernetes-sigs/kwok/releases/download/v0.1.0/kwokctl-$(go env GOOS)-$(go env GOARCH)" -O "/usr/local/bin/kwokctl" && + wget "https://github.com/kubernetes-sigs/kwok/releases/download/v0.4.0/kwokctl-$(go env GOOS)-$(go env GOARCH)" -O "/usr/local/bin/kwokctl" && chmod +x "/usr/local/bin/kwokctl" } @@ -150,38 +151,27 @@ function create_data_plane() { local name="${1}" local version="${2:-v1.19.16}" local kubeconfig - local pedia_cluster local ip install_kwokctl - KWOK_KUBE_VERSION="${version}" kwokctl create cluster --name "${name}" --quiet-pull ip="$(host_docker_internal)" + kwokctl create cluster --name "${name}" --wait 120s --kubeconfig "" --config - < Date: Sat, 7 Oct 2023 15:04:56 +0800 Subject: [PATCH 2/2] ci: remove the old singular releases Signed-off-by: Shiming Zhang (cherry picked from commit 70a022822f5762119e87766f80259b88cd0a8d4e) Signed-off-by: Iceber Gu --- test/environments/multiple.env.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/environments/multiple.env.sh b/test/environments/multiple.env.sh index 737a9569f..9cd8ae857 100755 --- a/test/environments/multiple.env.sh +++ b/test/environments/multiple.env.sh @@ -20,13 +20,9 @@ releases=( v1.22.17 v1.21.14 v1.20.15 - v1.19.16 v1.18.20 - v1.17.17 v1.16.15 - v1.15.12 v1.14.10 - v1.13.12 v1.12.10 v1.11.10 v1.10.13