This is an automated email from the ASF dual-hosted git repository.
pingsutw pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/submarine.git
The following commit(s) were added to refs/heads/master by this push:
new 1a21b21d SUBMARINE-1221. Check supported Kubernetes version in GitHub
Actions.
1a21b21d is described below
commit 1a21b21d747a86b18c4ec39a49a4322b89606754
Author: Kenchu123 <[email protected]>
AuthorDate: Wed Apr 27 03:00:22 2022 +0800
SUBMARINE-1221. Check supported Kubernetes version in GitHub Actions.
### What is this PR for?
<!-- A few sentences describing the overall goals of the pull request's
commits.
First time? Check out the contributing guide -
https://submarine.apache.org/contribution/contributions.html
-->
It is found that the dependencies fail on different Kubernetes versions.
Hence, we want to add check-in GitHub Actions to automatically test the
supported Kubernetes version.
It'll check from v1.18 to v1.23.
However, there are changes to custom resources in v1.22 and v1.23, so it
will fail in these two versions.
### What type of PR is it?
Improvement
### Todos
None
### What is the Jira issue?
<!-- * Open an issue on Jira
https://issues.apache.org/jira/browse/SUBMARINE/
* Put link here, and add [SUBMARINE-*Jira number*] in PR title, eg.
`SUBMARINE-23. PR title`
-->
https://issues.apache.org/jira/browse/SUBMARINE-1221
### How should this be tested?
<!--
* First time? Setup Travis CI as described on
https://submarine.apache.org/contribution/contributions.html#continuous-integration
* Strongly recommended: add automated unit tests for any new or changed
behavior
* Outline any manual steps to test the PR here.
-->
Push your code to GitHub, and GitHub action will handle more versions.
### Screenshots (if appropriate)

### Questions:
* Do the license files need updating? No
* Are there breaking changes for older versions? No
* Does this need new documentation? No
Author: Kenchu123 <[email protected]>
Signed-off-by: Kevin <[email protected]>
Closes #941 from Kenchu123/SUBMARINE-1221 and squashes the following
commits:
713eba72 [Kenchu123] remove k8s 22 and 23 version test
e9b6f5af [Kenchu123] add more version of k8s
115517d8 [Kenchu123] fix operator typo error
d795b478 [Kenchu123] add dynamic matrix generation
09b493f7 [Kenchu123] change k8s version to match kind's dockerhub
f05097bb [Kenchu123] submarine-k8s add matrix strategy
ea596bee [Kenchu123] submarine-k8s add matrix strategy
---
.github/workflows/master.yml | 24 ++++++++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml
index c72f355b..a2d65982 100644
--- a/.github/workflows/master.yml
+++ b/.github/workflows/master.yml
@@ -22,9 +22,15 @@ env:
VERSION: "0.8.0-SNAPSHOT"
BUILD_FLAG: "clean install -ntp -DskipTests -am"
TEST_FLAG: "test -DskipRat -ntp"
- KUBERNETES_VERSION: "v1.21.2"
-
jobs:
+ generate-k8s-versions-array:
+ runs-on: ubuntu-latest
+ outputs:
+ matrix: ${{ steps.set-matrix.outputs.matrix }}
+ steps:
+ - id: set-matrix
+ run: |
+ echo "::set-output name=matrix::[\"v1.18.20\", \"v1.19.16\",
\"v1.20.15\", \"v1.21.10\"]"
submarine-operator-verify-codegen:
runs-on: ubuntu-latest
timeout-minutes: 10
@@ -49,8 +55,13 @@ jobs:
working-directory: ${{ env.working-directory }}/submarine-cloud-v2
run: ./hack/verify-codegen.sh
submarine-operator-e2e-test:
+ needs: generate-k8s-versions-array
runs-on: ubuntu-latest
timeout-minutes: 60
+ strategy:
+ matrix:
+ k8s-version:
${{fromJSON(needs.generate-k8s-versions-array.outputs.matrix)}}
+ fail-fast: false
steps:
- uses: actions/checkout@v2
with:
@@ -81,7 +92,7 @@ jobs:
helm version
kind version
- name: Create kind cluster
- run: kind create cluster --config
./.github/config/kind-config-kind.yaml --wait 3m --image
kindest/node:${KUBERNETES_VERSION}
+ run: kind create cluster --config
./.github/config/kind-config-kind.yaml --wait 3m --image kindest/node:${{
matrix.k8s-version }}
- name: Show K8s cluster information
run: |
kubectl cluster-info
@@ -165,8 +176,13 @@ jobs:
echo ">>> mvn ${TEST_FLAG} ${TEST_MODULES} -B"
mvn ${TEST_FLAG} ${TEST_MODULES} -B
submarine-k8s:
+ needs: generate-k8s-versions-array
runs-on: ubuntu-latest
timeout-minutes: 60
+ strategy:
+ matrix:
+ k8s-version:
${{fromJson(needs.generate-k8s-versions-array.outputs.matrix)}}
+ fail-fast: false
steps:
- uses: actions/checkout@v2
with:
@@ -197,7 +213,7 @@ jobs:
helm version
kind version
- name: Create kind cluster
- run: kind create cluster --config
./.github/config/kind-config-kind.yaml --wait 3m --image
kindest/node:${KUBERNETES_VERSION}
+ run: kind create cluster --config
./.github/config/kind-config-kind.yaml --wait 3m --image kindest/node:${{
matrix.k8s-version }}
- name: Show K8s cluster information
run: |
kubectl cluster-info
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]