-
Notifications
You must be signed in to change notification settings - Fork 73
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: Add k8s 1.30 version compatibility test #3512
Conversation
@@ -114,7 +114,7 @@ jobs: | |||
fail-fast: false | |||
matrix: | |||
# Synchronise with the latest releases of each version | |||
version: [v1.22.7, v1.23.5, v1.24.4, v1.25.3, v1.26.2, v1.27.1, v1.28.0] | |||
version: [v1.22.7, v1.23.5, v1.24.4, v1.25.3, v1.26.2, v1.27.1, v1.28.0, v1.29.1, v1.30.0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这些版本是否有规律,有的 是 v1.22.7 , 有的是 v1.30.0
那么 这些 版本 是否 可以有一个 自动化脚本 更新,而不是人工
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
3037dc8
to
f83a94f
Compare
@@ -108,13 +111,62 @@ jobs: | |||
submit: false | |||
secrets: inherit | |||
|
|||
check_kind_node_version: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// update k8s matrix in step "call_k8s_matrix"
update_k8s_matrix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
||
# Copyright 2024 Authors of spidernet-io | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should add more comment on the top to describe the usage and function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
for tag in $tags; do | ||
if [[ $tag =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then | ||
# Compatibility testing 1.22 to latest version | ||
if [[ ! $KIND_NODE_VERSION =~ ${tag%.*} && ${tag%.*} > "v1.21" ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the lowest version should not be hard-coded
that could be a parameter of the script
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
||
echo "Updating k8s matrix run file..." | ||
KIND_NODE_VERSION="" | ||
function update_kindnode_version() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getAllLatestVersion
there is no update operation in the function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
||
KIND_NODE_VERSION="${KIND_NODE_VERSION%, }" | ||
KIND_NODE_VERSION="[$KIND_NODE_VERSION]" | ||
origin_version=$(grep -oP '(?<=version: )\[[^\]]+\]' .github/workflows/auto-diff-k8s-ci.yaml) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it could get it from the script parameter, rather than grep
which help decouple the code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
call_k8s_matrix: | ||
# k8s versions | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# Synchronise with the latest releases of each version | ||
version: [v1.22.7, v1.23.5, v1.24.4, v1.25.3, v1.26.2, v1.27.1, v1.28.0] | ||
# If a new version of kind/node is released, it will be updated automatically. | ||
version: [v1.25.16, v1.26.15, v1.27.13, v1.28.9, v1.29.4, v1.30.0, v1.23.17, v1.24.17, v1.22.17] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this could be a environment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
matrix.version: 要的格式是 [ xxx , xxx ]、或者 version:-1 - 2
环境变量传值 matrix.version 不认,无法解析的 yaml 格式
Signed-off-by: tao.yang <tao.yang@daocloud.io> Signed-off-by: ty-dc <tao.yang@daocloud.io>
Thanks for contributing!
What type of PR is this?
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer: