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 230823e  SUBMARINE-1150. Update the Kubernetes version and add golang 
style checker to GitHub actions
230823e is described below

commit 230823eef00b69fc3987b8803ef6fc3fe40f0e2e
Author: MortalHappiness <b07901...@ntu.edu.tw>
AuthorDate: Tue Dec 21 00:20:09 2021 +0800

    SUBMARINE-1150. Update the Kubernetes version and add golang style checker 
to 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
    -->
    Update the Kubernetes version and add golang style checker to GitHub actions
    
    ### What type of PR is it?
    [Improvement]
    
    ### Todos
    * [x] - Update the kind cluster Kubernetes version from v1.15.12 to v1.21.2
    * [x] - Add golang style checker to GitHub actions
    
    ### What is the Jira issue?
    https://issues.apache.org/jira/projects/SUBMARINE/issues/SUBMARINE-1150
    
    ### How should this be tested?
    
    ### 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: MortalHappiness <b07901...@ntu.edu.tw>
    
    Signed-off-by: Kevin <pings...@apache.org>
    
    Closes #843 from MortalHappiness/SUBMARINE-1150 and squashes the following 
commits:
    
    cb6df4aa [MortalHappiness] Add license
    3b28232d [MortalHappiness] Add golang style checker
    dcdb6cd8 [MortalHappiness] Update the Kubernetes version to v1.21.2
---
 .github/workflows/master.yml              |  7 +++++--
 .github/workflows/python.yml              |  5 ++++-
 dev-support/style-check/lint-go.sh        | 28 ++++++++++++++++++++++++++++
 website/docs/gettingStarted/quickstart.md |  2 +-
 4 files changed, 38 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml
index 767d2ae..2d851dc 100644
--- a/.github/workflows/master.yml
+++ b/.github/workflows/master.yml
@@ -22,6 +22,7 @@ env:
   VERSION: "0.7.0-SNAPSHOT"
   BUILD_FLAG: "clean install -ntp -DskipTests -am"
   TEST_FLAG: "test -DskipRat -ntp"
+  KUBERNETES_VERSION: "v1.21.2"
 
 jobs:
   submarine-operator-verify-codegen:
@@ -80,7 +81,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:v1.15.12
+        run: kind create cluster --config 
./.github/config/kind-config-kind.yaml --wait 3m --image 
kindest/node:${KUBERNETES_VERSION}
       - name: Show K8s cluster information
         run: |
           kubectl cluster-info
@@ -196,7 +197,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:v1.15.12
+        run: kind create cluster --config 
./.github/config/kind-config-kind.yaml --wait 3m --image 
kindest/node:${KUBERNETES_VERSION}
       - name: Show K8s cluster information
         run: |
           kubectl cluster-info
@@ -492,6 +493,8 @@ jobs:
         run: ./dev-support/style-check/lint-scala.sh
       - name: Angular Style
         run: ./dev-support/style-check/lint-angular.sh
+      - name: Go Style
+        run: ./dev-support/style-check/lint-go.sh
   sonarcloud:
     if: github.repository == 'apache/submarine' && github.event_name == 'push' 
&& github.ref == 'refs/heads/master'
     name: SonarCloud
diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml
index 137e200..973a3c8 100644
--- a/.github/workflows/python.yml
+++ b/.github/workflows/python.yml
@@ -18,6 +18,9 @@ name: python-sdk
 # Trigger the workflow on push or pull request
 on: [push, pull_request]
 
+env:
+  KUBERNETES_VERSION: "v1.21.2"
+
 jobs:
   check-style:
     runs-on: ubuntu-latest
@@ -79,7 +82,7 @@ jobs:
           mvn --version
           java -version
       - name: Create kind cluster
-        run: kind create cluster --config 
./.github/config/kind-config-kind.yaml --wait 3m --image kindest/node:v1.15.12
+        run: kind create cluster --config 
./.github/config/kind-config-kind.yaml --wait 3m --image 
kindest/node:${KUBERNETES_VERSION}
       - name: Show K8s cluster information
         run: |
           kubectl cluster-info
diff --git a/dev-support/style-check/lint-go.sh 
b/dev-support/style-check/lint-go.sh
new file mode 100755
index 0000000..9205d8e
--- /dev/null
+++ b/dev-support/style-check/lint-go.sh
@@ -0,0 +1,28 @@
+#!/usr/bin/env bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+cd "$(dirname $0)"
+cd ../../submarine-cloud-v2
+
+if [ -n "$(go fmt ./...)" ]; then
+    echo "Go code is not formatted, please run 'go fmt ./...'." >&2
+    exit 1
+else
+    echo "Go code is formatted"
+fi
diff --git a/website/docs/gettingStarted/quickstart.md 
b/website/docs/gettingStarted/quickstart.md
index b5e3e4b..0d38456 100644
--- a/website/docs/gettingStarted/quickstart.md
+++ b/website/docs/gettingStarted/quickstart.md
@@ -36,7 +36,7 @@ This document gives you a quick view on the basic usage of 
Submarine platform. Y
 
 2. Start minikube cluster
 ```
-minikube start --vm-driver=docker --cpus 8 --memory 4096 --kubernetes-version 
v1.21.6
+minikube start --vm-driver=docker --cpus 8 --memory 4096 --kubernetes-version 
v1.21.2
 ```
 
 ### Launch submarine in the cluster

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@submarine.apache.org
For additional commands, e-mail: dev-h...@submarine.apache.org

Reply via email to