From 40d8a81f4929a3d3fdff06096d121596e8aa4a73 Mon Sep 17 00:00:00 2001 From: Haitao Li Date: Thu, 7 Mar 2024 07:50:41 +1100 Subject: [PATCH] Bump aws-sdk-go v1.50.33 --- Dockerfile | 3 ++- Makefile | 5 +++-- go.mod | 4 ++-- go.sum | 5 +++++ 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 68ea300d..488f0c21 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,11 @@ FROM --platform=$BUILDPLATFORM golang:1.20 as builder ARG TARGETPLATFORM +ARG ENVVAR WORKDIR /go/src/github.com/atlassian/escalator/ COPY go.mod go.sum Makefile ./ COPY cmd cmd COPY pkg pkg -RUN make build +RUN make build ENVVAR=$ENVVAR FROM alpine:3.16 RUN apk --no-cache add ca-certificates diff --git a/Makefile b/Makefile index 965d8d22..d2bdc412 100644 --- a/Makefile +++ b/Makefile @@ -3,10 +3,11 @@ TARGET=escalator SRC_DIRS=pkg cmd SOURCES=$(shell for dir in $(SRC_DIRS); do if [ -d $$dir ]; then find $$dir -type f -iname '*.go'; fi; done) +ENVVAR ?= CGO_ENABLED=0 ARCH=$(if $(TARGETPLATFORM),$(lastword $(subst /, ,$(TARGETPLATFORM))),amd64) $(TARGET): $(SOURCES) - CGO_ENABLED=0 GOARCH=$(ARCH) go build -a -installsuffix cgo -o $(TARGET) cmd/main.go + $(ENVVAR) GOARCH=$(ARCH) go build -a -installsuffix cgo -o $(TARGET) cmd/main.go build: $(TARGET) @@ -17,7 +18,7 @@ test-vet: go vet ./... docker: Dockerfile - docker buildx build -t atlassian/escalator --platform linux/$(ARCH) . + docker buildx build --build-arg ENVVAR="$(ENVVAR)" -t atlassian/escalator --platform linux/$(ARCH) . clean: rm -f $(TARGET) diff --git a/go.mod b/go.mod index 30cccb12..301c5d38 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/atlassian/escalator go 1.20 require ( - github.com/aws/aws-sdk-go v1.34.0 + github.com/aws/aws-sdk-go v1.50.33 github.com/google/uuid v1.3.0 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.11.1 @@ -36,7 +36,7 @@ require ( github.com/google/go-cmp v0.5.9 // indirect github.com/google/gofuzz v1.1.0 // indirect github.com/imdario/mergo v0.3.6 // indirect - github.com/jmespath/go-jmespath v0.3.0 // indirect + github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/konsorten/go-windows-terminal-sequences v1.0.3 // indirect diff --git a/go.sum b/go.sum index e5a53a18..f11bc72a 100644 --- a/go.sum +++ b/go.sum @@ -12,6 +12,8 @@ github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d h1:UQZhZ2O0vMHr2c github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/aws/aws-sdk-go v1.34.0 h1:brux2dRrlwCF5JhTL7MUT3WUwo9zfDHZZp3+g3Mvlmo= github.com/aws/aws-sdk-go v1.34.0/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= +github.com/aws/aws-sdk-go v1.50.33 h1:/SKPJ7ZVPCFOYZyTKo5YdjeUEeOn2J2M0qfDTXWAoEU= +github.com/aws/aws-sdk-go v1.50.33/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -96,6 +98,9 @@ github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28= github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/jmespath/go-jmespath v0.3.0 h1:OS12ieG61fsCg5+qLJ+SsW9NicxNkg3b25OyT2yCeUc= github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= +github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=