From 749a80714f2267375fd7239b796c4f6fe984927d Mon Sep 17 00:00:00 2001 From: janisz Date: Fri, 21 Aug 2020 11:11:25 +0200 Subject: [PATCH] Update Go to 1.15 (#1552) * Set minimum TLS version to 1.2 It's now the industry standard to deprecate TLS 1.0 and 1.1. See: https://tools.ietf.org/html/draft-ietf-tls-oldversions-deprecate-00 * Bump Go 1.15 Currently DC/OS CLI keeps backward compatibility for macOS 10.10 Yosemite (2014) after updating Go version we will drop it and support only macOS 10.12 Sierra or later. * Use mesos image to build binaries Use newer base kernel as recommended in https://github.com/golang/go/issues/40893 * Update CHANGELOG.md --- .appveyor.yml | 6 +++--- .travis.yml | 4 ++-- CHANGELOG.md | 2 ++ Dockerfile | 4 ++-- ci/integration-tests.groovy | 2 +- pkg/setup/setup.go | 2 +- 6 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 021630670..2192a3cbe 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,6 +1,6 @@ install: - SET PATH=C:\msys64\mingw64\bin;c:\gopath\bin;%PATH% - - go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.27.0 + - curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b "c:\gopath\bin" v1.30.0 build: off @@ -10,9 +10,9 @@ environment: GOPATH: c:\gopath NO_DOCKER: 1 -stack: go 1.12 +stack: go 1.15 +image: Visual Studio 2019 test_script: - - SET GO111MODULE=on - mingw32-make windows - mingw32-make test diff --git a/.travis.yml b/.travis.yml index 3372c0b34..d63ff419e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ os: language: go -go: "1.12.x" +go: "1.15.x" go_import_path: github.com/dcos/dcos-cli @@ -12,7 +12,7 @@ env: - NO_DOCKER=1 GO111MODULE=on before_install: - - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.21.0 + - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.30.0 script: - make diff --git a/CHANGELOG.md b/CHANGELOG.md index e5513ecc2..809578de2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ * Accepts `DCOS_CLUSTER_SETUP_ACS_TOKEN` in `dcos auth login` (#1550) * Read auth token without echoing it (#1551) * Overcome Windows 254 characters limit on Windows (#1551) + * Update Go to 1.15 – support only macOS 10.12 Sierra or later (#1552) + * Require TLS 1.2 or above (#1552) ## 1.1.3 diff --git a/Dockerfile b/Dockerfile index 315b37133..e919f156b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ -FROM golang:1.12 +FROM golang:1.15 RUN go get -u \ golang.org/x/lint/golint \ github.com/awalterschulze/goderive \ github.com/br-lewis/go-bindata/... -RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.21.0 \ No newline at end of file +RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.30.0 \ No newline at end of file diff --git a/ci/integration-tests.groovy b/ci/integration-tests.groovy index ca5c055e2..badc755a2 100644 --- a/ci/integration-tests.groovy +++ b/ci/integration-tests.groovy @@ -43,7 +43,7 @@ pipeline { } stage("Build binaries") { - agent { label 'mesos-ubuntu' } + agent { label 'mesos' } steps { sh 'make linux darwin windows' diff --git a/pkg/setup/setup.go b/pkg/setup/setup.go index c770a4120..d294e7edc 100644 --- a/pkg/setup/setup.go +++ b/pkg/setup/setup.go @@ -233,7 +233,7 @@ func (s *Setup) configureTLS(flags *Flags) (*tls.Config, error) { return nil, err } } - return &tls.Config{RootCAs: certPool}, nil + return &tls.Config{RootCAs: certPool, MinVersion: tls.VersionTLS12}, nil } // isX509UnknownAuthorityError checks whether an error is of type x509.UnknownAuthorityError.