Skip to content

Commit 3a6a224

Browse files
authored
Merge pull request #107 from jpmcb/update-go
Upgrade to `go 1.19`, bump dependencies, & use latest SDK
2 parents 20b98bf + 39657d8 commit 3a6a224

File tree

8 files changed

+39
-34
lines changed

8 files changed

+39
-34
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,30 @@ jobs:
77
name: lint
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v2
10+
- uses: actions/setup-go@v3
11+
with:
12+
go-version: 1.19
13+
- uses: actions/checkout@v3
1114
- name: golangci-lint
12-
uses: golangci/golangci-lint-action@v2
15+
uses: golangci/golangci-lint-action@v3
1316
with:
14-
version: v1.29
17+
version: latest
1518
working-directory: ./updater
1619
build:
1720
name: build
1821
runs-on: ubuntu-latest
1922
steps:
20-
- uses: actions/checkout@v2
23+
- uses: actions/setup-go@v3
24+
with:
25+
go-version: 1.19
26+
- uses: actions/checkout@v3
2127
- run: make
2228
test:
2329
name: unit tests
2430
runs-on: ubuntu-latest
2531
steps:
26-
- uses: actions/checkout@v2
32+
- uses: actions/setup-go@v3
33+
with:
34+
go-version: 1.19
35+
- uses: actions/checkout@v3
2736
- run: make test

.golangci.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
linters:
22
enable:
3-
- structcheck
4-
- varcheck
53
- staticcheck
64
- unconvert
75
- goimports
8-
- golint
6+
- revive
97
- ineffassign
108
- vet
119
- unused

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 0.2.1
2+
3+
* Bump version of Go to 1.19.1 and upgrade dependencies
4+
15
# 0.2.0
26

37
* Add support for clusters larger than 50 container instances.

Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ ENV GOPROXY=direct
1313
# Sets the target architecture for the binary
1414
ARG GOARCH
1515
ENV OUTPUT_DIR=/wrkdir/target/${GOARCH}/release
16-
COPY updater/go.mod updater/go.sum /wrkdir/
17-
RUN go mod download
1816
COPY ./updater /wrkdir/
17+
RUN go mod download
1918
RUN CGO_ENABLED=0 go build -v -o ${OUTPUT_DIR}/bottlerocket-ecs-updater . && \
2019
cp ${OUTPUT_DIR}/bottlerocket-ecs-updater /wrkdir/bottlerocket-ecs-updater
2120

Dockerfile.licenses

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ARG SDK_IMAGE
1212
# GOLANG_IMAGE is the image to be used for collecting modules. This should be
1313
# the same image used in the build. The idea is to have the same toolchain to
1414
# avoid running into any differences between versions.
15-
ARG GOLANG_IMAGE=golang:1.16.3
15+
ARG GOLANG_IMAGE=golang:1.19.1
1616

1717
# Fetch dependencies into a vendor/ directory.
1818
#
@@ -24,10 +24,9 @@ WORKDIR /wrkdir
2424
ENV GOPROXY=direct
2525
# Sets the target architecture for the binary
2626
ARG GOARCH
27-
COPY updater/go.mod updater/go.sum /wrkdir/
27+
COPY ./updater /wrkdir/
2828
RUN go mod download
2929
# Unpack go modules into a vendor/ directory to run scanner on.
30-
COPY ./updater /wrkdir/
3130
RUN go mod vendor
3231

3332
# Run the license scanner and dump its processed & collected license data to be

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SHELL is set as bash to use some bashisms.
22
SHELL = bash
33

4-
BOTTLEROCKET_SDK_VERSION = v0.22.0
4+
BOTTLEROCKET_SDK_VERSION = v0.27.0
55
BOTTLEROCKET_SDK_ARCH = x86_64
66
UPDATER_TARGET_ARCH = amd64
77

updater/go.mod

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
module github.com/bottlerocket-os/bottlerocket-ecs-updater
22

3-
go 1.15
3+
go 1.19
44

55
require (
6-
github.com/aws/aws-sdk-go v1.38.0
6+
github.com/aws/aws-sdk-go v1.44.107
77
github.com/stretchr/testify v1.7.0
88
)
9+
10+
require (
11+
github.com/davecgh/go-spew v1.1.0 // indirect
12+
github.com/jmespath/go-jmespath v0.4.0 // indirect
13+
github.com/pmezard/go-difflib v1.0.0 // indirect
14+
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect
15+
)

updater/go.sum

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,22 @@
1-
github.com/aws/aws-sdk-go v1.38.0 h1:mqnmtdW8rGIQmp2d0WRFLua0zW0Pel0P6/vd3gJuViY=
2-
github.com/aws/aws-sdk-go v1.38.0/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
1+
github.com/aws/aws-sdk-go v1.44.107 h1:VP7Rq3wzsOV7wrfHqjAAKRksD4We58PaoVSDPKhm8nw=
2+
github.com/aws/aws-sdk-go v1.44.107/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo=
33
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
44
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
55
github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
66
github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
77
github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8=
88
github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
9-
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
109
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
1110
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
1211
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
13-
github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4=
1412
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
1513
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
1614
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
17-
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
18-
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI=
19-
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
20-
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
21-
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b h1:uwuIcX0g4Yl1NC5XAz37xsr2lTtcqevgzYNVt49waME=
22-
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
23-
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
24-
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
25-
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA=
26-
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
27-
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
28-
golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
29-
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
30-
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e h1:FDhOuMEY4JVRztM/gsbk+IKUQ8kj74bxZrgw87eMMVc=
15+
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
16+
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
17+
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
18+
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
19+
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
3120
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
3221
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
3322
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=

0 commit comments

Comments
 (0)