From 6ab8d841a9a6f337fd1264847386ea4bdd1f173d Mon Sep 17 00:00:00 2001 From: Mythri Garaga Manjunatha Date: Mon, 7 Sep 2020 23:52:37 -0700 Subject: [PATCH] Update go version to 1.15 in travis.yml, github actions, dockerfiles --- .github/workflows/build.yml | 6 +++--- .travis.yml | 4 ++-- agent/api/task/util_test.go | 3 ++- misc/fluent-logger/Dockerfile | 2 +- misc/gremlin/Makefile | 2 +- misc/netkitten/Makefile | 2 +- scripts/dockerfiles/Dockerfile.buildECSCNIPlugins | 2 +- scripts/dockerfiles/Dockerfile.cleanbuild | 2 +- scripts/dockerfiles/Dockerfile.test | 2 +- 9 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e05867c1941..d06ceee5ff2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ jobs: steps: - uses: actions/setup-go@v2 with: - go-version: 1.12 + go-version: 1.15 - uses: actions/checkout@v2 with: path: src/github.com/aws/amazon-ecs-agent @@ -28,7 +28,7 @@ jobs: steps: - uses: actions/setup-go@v2 with: - go-version: 1.12 + go-version: 1.15 - uses: actions/checkout@v2 with: submodules: true @@ -46,7 +46,7 @@ jobs: steps: - uses: actions/setup-go@v2 with: - go-version: 1.12 + go-version: 1.15 - uses: actions/checkout@v2 with: submodules: true diff --git a/.travis.yml b/.travis.yml index 493281f9a7b..d89f4c76d81 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,15 +1,15 @@ language: go go_import_path: github.com/aws/amazon-ecs-agent sudo: false -go: - - 1.12 matrix: include: - os: linux + go: 1.15 script: - make test - make analyze-cover-profile - os: windows + go: 1.12 script: - go test -v -race -tags unit -coverprofile cover.out -timeout 40s ./agent/... diff --git a/agent/api/task/util_test.go b/agent/api/task/util_test.go index 51a2c2ec2de..102a8237413 100644 --- a/agent/api/task/util_test.go +++ b/agent/api/task/util_test.go @@ -16,13 +16,14 @@ package task import ( + "fmt" "reflect" "testing" ) func taskN(n int) *Task { return &Task{ - Arn: string(n), + Arn: fmt.Sprint(n), } } diff --git a/misc/fluent-logger/Dockerfile b/misc/fluent-logger/Dockerfile index 30b3f407e09..98e83bf808a 100644 --- a/misc/fluent-logger/Dockerfile +++ b/misc/fluent-logger/Dockerfile @@ -10,7 +10,7 @@ # 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. -FROM golang:1.12 +FROM golang:1.15 MAINTAINER Amazon Web Services, Inc. COPY fluent-logger / diff --git a/misc/gremlin/Makefile b/misc/gremlin/Makefile index b88f3c540ba..608b2645b32 100644 --- a/misc/gremlin/Makefile +++ b/misc/gremlin/Makefile @@ -15,7 +15,7 @@ all: gremlin image gremlin: gremlin.go - docker run -v $(shell pwd):/out -v $(shell pwd)/gremlin.go:/in/gremlin.go -e CGO_ENABLED=0 golang:1.12 go build -a -x -ldflags '-s' -o /out/gremlin /in/gremlin.go + docker run -v $(shell pwd):/out -v $(shell pwd)/gremlin.go:/in/gremlin.go -e CGO_ENABLED=0 golang:1.15 go build -a -x -ldflags '-s' -o /out/gremlin /in/gremlin.go image: gremlin @./docker-image diff --git a/misc/netkitten/Makefile b/misc/netkitten/Makefile index 6dd5300bb80..5f21a71f197 100644 --- a/misc/netkitten/Makefile +++ b/misc/netkitten/Makefile @@ -15,7 +15,7 @@ all: netkitten image netkitten: - docker run -v $(shell pwd):/out -v $(shell pwd)/netkitten.go:/in/netkitten.go -e CGO_ENABLED=0 golang:1.12 go build -a -installsuffix cgo -ldflags '-s' -o /out/netkitten /in/netkitten.go + docker run -v $(shell pwd):/out -v $(shell pwd)/netkitten.go:/in/netkitten.go -e CGO_ENABLED=0 golang:1.15 go build -a -installsuffix cgo -ldflags '-s' -o /out/netkitten /in/netkitten.go image: netkitten @./docker-image diff --git a/scripts/dockerfiles/Dockerfile.buildECSCNIPlugins b/scripts/dockerfiles/Dockerfile.buildECSCNIPlugins index 0e7d9e48660..9af2e0cce41 100644 --- a/scripts/dockerfiles/Dockerfile.buildECSCNIPlugins +++ b/scripts/dockerfiles/Dockerfile.buildECSCNIPlugins @@ -11,7 +11,7 @@ # express or implied. See the License for the specific language governing # permissions and limitations under the License. -FROM golang:1.12 +FROM golang:1.15 MAINTAINER Amazon Web Services, Inc. ENV XDG_CACHE_HOME /tmp diff --git a/scripts/dockerfiles/Dockerfile.cleanbuild b/scripts/dockerfiles/Dockerfile.cleanbuild index de72a61ac89..a43a399c436 100644 --- a/scripts/dockerfiles/Dockerfile.cleanbuild +++ b/scripts/dockerfiles/Dockerfile.cleanbuild @@ -11,7 +11,7 @@ # express or implied. See the License for the specific language governing # permissions and limitations under the License. -FROM golang:1.12 +FROM golang:1.15 MAINTAINER Amazon Web Services, Inc. ENV XDG_CACHE_HOME /tmp diff --git a/scripts/dockerfiles/Dockerfile.test b/scripts/dockerfiles/Dockerfile.test index d29fb230634..11bc3de246e 100644 --- a/scripts/dockerfiles/Dockerfile.test +++ b/scripts/dockerfiles/Dockerfile.test @@ -32,7 +32,7 @@ RUN apt-get update && apt-get install -y \ --no-install-recommends \ && rm -rf /var/lib/apt/lists/* -ENV GOLANG_VERSION 1.12.4 +ENV GOLANG_VERSION 1.15 ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz ENV GOLANG_DOWNLOAD_SHA256 d7d1f1f88ddfe55840712dc1747f37a790cbcaa448f6c9cf51bbe10aa65442f5