Skip to content

Commit

Permalink
Bump k8s modules to 0.22.0 and golang to 1.16.7 (#6342)
Browse files Browse the repository at this point in the history
Also, bump golangci-lint to 1.41.1.
  • Loading branch information
shu-mutou authored Aug 12, 2021
1 parent 49260da commit 3dd8f5a
Show file tree
Hide file tree
Showing 11 changed files with 188 additions and 111 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cd-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.15.1
go-version: 1.16.7

- name: Setup NodeJS
uses: actions/[email protected]
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.15.1
go-version: 1.16.7

- name: Setup NodeJS
uses: actions/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-license-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
- name: Install Dependencies
shell: bash
run: |
[ ! -d "node_modules" ] && npm ci || node aio/scripts/version.mjs && command -v golangci-lint >/dev/null 2>&1 || { curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.30.0; } && go mod download
[ ! -d "node_modules" ] && npm ci || node aio/scripts/version.mjs && command -v golangci-lint >/dev/null 2>&1 || { curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.41.1; } && go mod download
- name: Check License
shell: bash
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.15.1
go-version: 1.16.7

- name: Setup NodeJS
uses: actions/[email protected]
Expand All @@ -71,7 +71,7 @@ jobs:
- name: Install Dependencies
shell: bash
run: |
[ ! -d "node_modules" ] && npm ci || node aio/scripts/version.mjs && command -v golangci-lint >/dev/null 2>&1 || { curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.30.0; } && go mod download
[ ! -d "node_modules" ] && npm ci || node aio/scripts/version.mjs && command -v golangci-lint >/dev/null 2>&1 || { curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.41.1; } && go mod download
- name: Install Codegen
shell: bash
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.15.1
go-version: 1.16.7

- name: Setup NodeJS
uses: actions/[email protected]
Expand All @@ -123,7 +123,7 @@ jobs:
shell: bash
run: |
export GOPATH=$(go env GOPATH)/bin
[ ! -d "node_modules" ] && npm ci || node aio/scripts/version.mjs && command -v golangci-lint >/dev/null 2>&1 || { curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.30.0; } && go mod download
[ ! -d "node_modules" ] && npm ci || node aio/scripts/version.mjs && command -v golangci-lint >/dev/null 2>&1 || { curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.41.1; } && go mod download
- name: Run Frontend Unit Tests
run: npm run test:frontend:coverage
Expand Down Expand Up @@ -161,7 +161,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.15.1
go-version: 1.16.7

- name: Setup NodeJS
uses: actions/[email protected]
Expand All @@ -179,7 +179,7 @@ jobs:
- name: Install Dependencies
shell: bash
run: |
[ ! -d "node_modules" ] && npm ci || node aio/scripts/version.mjs && command -v golangci-lint >/dev/null 2>&1 || { curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.30.0; } && go mod download && npm install cypress
[ ! -d "node_modules" ] && npm ci || node aio/scripts/version.mjs && command -v golangci-lint >/dev/null 2>&1 || { curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.41.1; } && go mod download && npm install cypress
- name: Run E2E Tests
run: npm run cluster:start && npm run e2e
8 changes: 6 additions & 2 deletions aio/develop/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

# golang is based on debian:jessie
# Specify version to clarify which version we use.
FROM golang:1.15.1-buster
FROM golang:1.16.7-buster

# Install Node.js. Go is already installed.
# A small tweak, apt-get update is already run by the nodejs setup script,
Expand Down Expand Up @@ -84,7 +84,7 @@ RUN mv ./kubectl /usr/local/bin/kubectl
# `npm ci` installs golangci, but this installation is needed
# for running `npm run check` singlely, like
# `aio/develop/run-npm-on-container.sh run check`.
RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.30.0
RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.41.1

# Install delve for debuging go files.
RUN go get github.com/go-delve/delve/cmd/dlv
Expand All @@ -98,6 +98,10 @@ ENV GOPROXY=https://proxy.golang.org
# Set NODE_OPTIONS to increase NodeJS heap size
ENV NODE_OPTIONS=--max-old-space-size=8192

# To install go modules by user, add write access to $GOPATH (default: 755)
# `chmod +w` does not work, so set 777.
RUN chmod 777 -R /go

# Volume for source code
VOLUME ["/go/src/github.com/kubernetes/dashboard"]

Expand Down
2 changes: 1 addition & 1 deletion aio/gulp/gocommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const env = lodash.merge(process.env, {PATH: devPath});
/**
* Minimum required Go Version
*/
const minGoVersion = '1.15.1';
const minGoVersion = '1.16.7';

/**
* Spawns a Go process after making sure all Go prerequisites are
Expand Down
2 changes: 1 addition & 1 deletion aio/scripts/conf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ HEAPSTER_VERSION="v1.5.4"
HEAPSTER_PORT=8082
KIND_VERSION="v0.10.0"
KIND_BIN=${CACHE_DIR}/kind-${KIND_VERSION}
CODEGEN_VERSION="v0.21.3"
CODEGEN_VERSION="v0.22.0"
CODEGEN_BIN=${GOPATH}/pkg/mod/k8s.io/code-generator@${CODEGEN_VERSION}/generate-groups.sh

# Setup logger.
Expand Down
2 changes: 1 addition & 1 deletion docs/developer/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Make sure the following software is installed and added to the `$PATH` variable:
* Curl 7+ ([installation manual](https://curl.se/docs/install.html))
* Git 2.13.2+ ([installation manual](https://git-scm.com/downloads))
* Docker 1.13.1+ ([installation manual](https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/))
* Golang 1.15+ ([installation manual](https://golang.org/dl/))
* Golang 1.16+ ([installation manual](https://golang.org/dl/))
* Dashboard uses `go mod` for go dependency management, so enable it with running `export GO111MODULE=on`.
* Node.js 14+ and npm 6+ ([installation with nvm](https://github.com/creationix/nvm#usage))
* Gulp.js 4+ ([installation manual](https://github.com/gulpjs/gulp/blob/master/docs/getting-started/1-quick-start.md))
Expand Down
11 changes: 6 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/kubernetes/dashboard

go 1.15
go 1.16

require (
github.com/docker/distribution v2.7.1+incompatible
Expand All @@ -14,9 +14,10 @@ require (
gopkg.in/igm/sockjs-go.v2 v2.1.0
gopkg.in/square/go-jose.v2 v2.4.1
gopkg.in/yaml.v2 v2.4.0
k8s.io/api v0.21.3
k8s.io/apiextensions-apiserver v0.21.3
k8s.io/apimachinery v0.21.3
k8s.io/client-go v0.21.3
k8s.io/api v0.22.0
k8s.io/apiextensions-apiserver v0.22.0
k8s.io/apimachinery v0.22.0
k8s.io/client-go v0.22.0
k8s.io/code-generator v0.22.0 // indirect
k8s.io/heapster v1.5.4
)
Loading

0 comments on commit 3dd8f5a

Please sign in to comment.