From 228b0815d049d76d57c5bb1554300f0d4fec56b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Linhart?= Date: Mon, 14 Feb 2022 14:13:58 +0100 Subject: [PATCH] Add support for ECR Public registry --- .drone.jsonnet | 9 + .drone.yml | 309 +++++++++++++++++- README.md | 8 +- cmd/drone-ecr-public/main.go | 190 +++++++++++ docker/ecr-public/Dockerfile.linux.amd64 | 4 + docker/ecr-public/Dockerfile.linux.arm | 4 + docker/ecr-public/Dockerfile.linux.arm64 | 4 + .../ecr-public/Dockerfile.windows.amd64.1803 | 10 + .../ecr-public/Dockerfile.windows.amd64.1809 | 10 + .../ecr-public/Dockerfile.windows.amd64.1909 | 10 + docker/ecr-public/manifest.tmpl | 49 +++ go.mod | 8 +- go.sum | 30 +- 13 files changed, 632 insertions(+), 13 deletions(-) create mode 100644 cmd/drone-ecr-public/main.go create mode 100644 docker/ecr-public/Dockerfile.linux.amd64 create mode 100644 docker/ecr-public/Dockerfile.linux.arm create mode 100644 docker/ecr-public/Dockerfile.linux.arm64 create mode 100644 docker/ecr-public/Dockerfile.windows.amd64.1803 create mode 100644 docker/ecr-public/Dockerfile.windows.amd64.1809 create mode 100644 docker/ecr-public/Dockerfile.windows.amd64.1909 create mode 100644 docker/ecr-public/manifest.tmpl diff --git a/.drone.jsonnet b/.drone.jsonnet index 99832f4e..7cdcfe2e 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -39,6 +39,15 @@ local pipeline = import 'pipeline.libsonnet'; 'linux-arm', ]), + pipeline.build('ecr-public', 'linux', 'amd64'), + pipeline.build('ecr-public', 'linux', 'arm64'), + pipeline.build('ecr-public', 'linux', 'arm'), + pipeline.notifications('ecr-public', depends_on=[ + 'linux-amd64', + 'linux-arm64', + 'linux-arm', + ]), + pipeline.build('heroku', 'linux', 'amd64'), pipeline.build('heroku', 'linux', 'arm64'), pipeline.build('heroku', 'linux', 'arm'), diff --git a/.drone.yml b/.drone.yml index a355d6b4..92468d68 100644 --- a/.drone.yml +++ b/.drone.yml @@ -138,6 +138,57 @@ trigger: - refs/heads/master - refs/tags/* +--- +kind: pipeline +type: ssh +name: windows-1809-ecr-public + +platform: + os: windows + +server: + host: windows.1809.amd64.plugins.drone.ci + password: + from_secret: windows_password + user: + from_secret: windows_username + +steps: +- name: build_latest + environment: + VERSION: 1809 + REGISTRY: ecr-public + USERNAME: + from_secret: docker_username + PASSWORD: + from_secret: docker_password + commands: + - powershell.exe scripts/windows/latest.ps1 + when: + event: [ push ] + +- name: build_tag + environment: + VERSION: 1809 + REGISTRY: ecr-public + USERNAME: + from_secret: docker_username + PASSWORD: + from_secret: docker_password + commands: + - powershell.exe scripts/windows/tag.ps1 + when: + event: [ tag ] + +depends_on: + - testing + - windows-1809-ecr + +trigger: + ref: + - refs/heads/master + - refs/tags/* + --- kind: pipeline type: ssh @@ -182,7 +233,7 @@ steps: depends_on: - testing - - windows-1809-ecr + - windows-1809-ecr-public trigger: ref: @@ -340,6 +391,56 @@ trigger: - refs/heads/master - refs/tags/* +--- +kind: pipeline +type: ssh +name: windows-1909-ecr-public + +platform: + os: windows + +server: + host: windows.1909.amd64.plugins.drone.ci + password: + from_secret: windows_password + user: + from_secret: windows_username + +steps: +- name: build_latest + environment: + VERSION: 1909 + REGISTRY: ecr-public + USERNAME: + from_secret: docker_username + PASSWORD: + from_secret: docker_password + commands: + - powershell.exe scripts/windows/latest.ps1 + when: + event: [ push ] + +- name: build_tag + environment: + VERSION: 1909 + REGISTRY: ecr-public + USERNAME: + from_secret: docker_username + PASSWORD: + from_secret: docker_password + commands: + - powershell.exe scripts/windows/tag.ps1 + when: + event: [ tag ] + +depends_on: + - testing + +trigger: + ref: + - refs/heads/master + - refs/tags/* + --- kind: pipeline type: ssh @@ -1073,6 +1174,212 @@ depends_on: - linux-arm64-ecr - linux-arm-ecr +--- +kind: pipeline +name: linux-amd64-ecr-public + +platform: + os: linux + arch: amd64 + +steps: +- name: build-push + image: golang:1.17.3 + commands: + - "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/amd64/drone-ecr-public ./cmd/drone-ecr-public" + environment: + CGO_ENABLED: 0 + GO111MODULE: on + when: + event: + exclude: + - tag + +- name: build-tag + image: golang:1.17.3 + commands: + - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/amd64/drone-ecr-public ./cmd/drone-ecr-public" + environment: + CGO_ENABLED: 0 + GO111MODULE: on + when: + event: + - tag + +- name: publish + image: plugins/docker:18 + settings: + auto_tag: true + auto_tag_suffix: linux-amd64 + daemon_off: false + dockerfile: docker/ecr-public/Dockerfile.linux.amd64 + password: + from_secret: docker_password + repo: plugins/ecr-public + username: + from_secret: docker_username + when: + event: + exclude: + - pull_request + +trigger: + ref: + - refs/heads/master + - "refs/tags/**" + - "refs/pull/**" + +depends_on: +- linux-amd64-docker + +--- +kind: pipeline +name: linux-arm64-ecr-public + +platform: + os: linux + arch: arm64 + +steps: +- name: build-push + image: golang:1.17.3 + commands: + - "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/arm64/drone-ecr-public ./cmd/drone-ecr-public" + environment: + CGO_ENABLED: 0 + GO111MODULE: on + when: + event: + exclude: + - tag + +- name: build-tag + image: golang:1.17.3 + commands: + - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm64/drone-ecr-public ./cmd/drone-ecr-public" + environment: + CGO_ENABLED: 0 + GO111MODULE: on + when: + event: + - tag + +- name: publish + image: plugins/docker:18 + settings: + auto_tag: true + auto_tag_suffix: linux-arm64 + daemon_off: false + dockerfile: docker/ecr-public/Dockerfile.linux.arm64 + password: + from_secret: docker_password + repo: plugins/ecr-public + username: + from_secret: docker_username + when: + event: + exclude: + - pull_request + +trigger: + ref: + - refs/heads/master + - "refs/tags/**" + - "refs/pull/**" + +depends_on: +- linux-arm64-docker + +--- +kind: pipeline +name: linux-arm-ecr-public + +platform: + os: linux + arch: arm + +steps: +- name: build-push + image: golang:1.17.3 + commands: + - "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/arm/drone-ecr-public ./cmd/drone-ecr-public" + environment: + CGO_ENABLED: 0 + GO111MODULE: on + when: + event: + exclude: + - tag + +- name: build-tag + image: golang:1.17.3 + commands: + - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm/drone-ecr-public ./cmd/drone-ecr-public" + environment: + CGO_ENABLED: 0 + GO111MODULE: on + when: + event: + - tag + +- name: publish + image: plugins/docker:18 + settings: + auto_tag: true + auto_tag_suffix: linux-arm + daemon_off: false + dockerfile: docker/ecr-public/Dockerfile.linux.arm + password: + from_secret: docker_password + repo: plugins/ecr-public + username: + from_secret: docker_username + when: + event: + exclude: + - pull_request + +trigger: + ref: + - refs/heads/master + - "refs/tags/**" + - "refs/pull/**" + +depends_on: +- linux-arm-docker + +--- +kind: pipeline +name: notifications-ecr-public + +platform: + os: linux + arch: amd64 + +steps: +- name: manifest + image: plugins/manifest + settings: + auto_tag: true + ignore_missing: true + password: + from_secret: docker_password + spec: docker/ecr-public/manifest.tmpl + username: + from_secret: docker_username + +trigger: + ref: + - refs/heads/master + - "refs/tags/**" + +depends_on: +- windows-1809-ecr-public +- windows-1909-ecr-public +- linux-amd64-ecr-public +- linux-arm64-ecr-public +- linux-arm-ecr-public + --- kind: pipeline name: linux-amd64-heroku diff --git a/README.md b/README.md index 7a507a04..b07c3ac2 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ export GO111MODULE=on go build -v -a -tags netgo -o release/linux/amd64/drone-docker ./cmd/drone-docker go build -v -a -tags netgo -o release/linux/amd64/drone-gcr ./cmd/drone-gcr go build -v -a -tags netgo -o release/linux/amd64/drone-ecr ./cmd/drone-ecr +go build -v -a -tags netgo -o release/linux/amd64/drone-ecr-public ./cmd/drone-ecr-public go build -v -a -tags netgo -o release/linux/amd64/drone-acr ./cmd/drone-acr go build -v -a -tags netgo -o release/linux/amd64/drone-heroku ./cmd/drone-heroku ``` @@ -47,6 +48,11 @@ docker build \ --label org.label-schema.vcs-ref=$(git rev-parse --short HEAD) \ --file docker/ecr/Dockerfile.linux.amd64 --tag plugins/ecr . +docker build \ + --label org.label-schema.build-date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \ + --label org.label-schema.vcs-ref=$(git rev-parse --short HEAD) \ + --file docker/ecr-public/Dockerfile.linux.amd64 --tag plugins/ecr-public . + docker build \ --label org.label-schema.build-date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \ --label org.label-schema.vcs-ref=$(git rev-parse --short HEAD) \ @@ -91,4 +97,4 @@ Run the changelog generator again with the future version according to semver. docker run -it --rm -v "$(pwd)":/usr/local/src/your-app githubchangeloggenerator/github-changelog-generator -u drone-plugins -p drone-docker -t --future-release v1.0.0 ``` -Create your pull request for the release. Get it merged then tag the release. \ No newline at end of file +Create your pull request for the release. Get it merged then tag the release. diff --git a/cmd/drone-ecr-public/main.go b/cmd/drone-ecr-public/main.go new file mode 100644 index 00000000..2b5e0579 --- /dev/null +++ b/cmd/drone-ecr-public/main.go @@ -0,0 +1,190 @@ +package main + +import ( + "encoding/base64" + "fmt" + "io/ioutil" + "log" + "os" + "os/exec" + "strconv" + "strings" + + "github.com/joho/godotenv" + "github.com/sirupsen/logrus" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/aws/credentials/stscreds" + "github.com/aws/aws-sdk-go/aws/session" + "github.com/aws/aws-sdk-go/service/ecrpublic" + + docker "github.com/drone-plugins/drone-docker" +) + +const defaultRegion = "us-east-1" + +func main() { + // Load env-file if it exists first + if env := os.Getenv("PLUGIN_ENV_FILE"); env != "" { + godotenv.Load(env) + } + + var ( + repo = getenv("PLUGIN_REPO") + registry = getenv("PLUGIN_REGISTRY") + region = getenv("PLUGIN_REGION", "ECR_REGION", "AWS_REGION") + key = getenv("PLUGIN_ACCESS_KEY", "ECR_ACCESS_KEY", "AWS_ACCESS_KEY_ID") + secret = getenv("PLUGIN_SECRET_KEY", "ECR_SECRET_KEY", "AWS_SECRET_ACCESS_KEY") + create = parseBoolOrDefault(false, getenv("PLUGIN_CREATE_REPOSITORY", "ECR_CREATE_REPOSITORY")) + repositoryPolicy = getenv("PLUGIN_REPOSITORY_POLICY") + assumeRole = getenv("PLUGIN_ASSUME_ROLE") + externalId = getenv("PLUGIN_EXTERNAL_ID") + ) + + // set the region + if region == "" { + region = defaultRegion + } + + os.Setenv("AWS_REGION", region) + + if key != "" && secret != "" { + os.Setenv("AWS_ACCESS_KEY_ID", key) + os.Setenv("AWS_SECRET_ACCESS_KEY", secret) + } + + sess, err := session.NewSession(&aws.Config{Region: ®ion}) + if err != nil { + log.Fatal(fmt.Sprintf("error creating AWS session: %v", err)) + } + + svc := getECRClient(sess, assumeRole, externalId) + username, password, err := getAuthInfo(svc) + + if err != nil { + log.Fatal(fmt.Sprintf("error getting ECR auth: %v", err)) + } + + if !strings.HasPrefix(repo, registry) { + repo = fmt.Sprintf("%s/%s", registry, repo) + } + + if create { + err = ensureRepoExists(svc, repo) + if err != nil { + log.Fatal(fmt.Sprintf("error creating ECR repo: %v", err)) + } + } + + if repositoryPolicy != "" { + p, err := ioutil.ReadFile(repositoryPolicy) + if err != nil { + log.Fatal(err) + } + if err := uploadRepositoryPolicy(svc, string(p), trimHostname(repo, registry)); err != nil { + log.Fatal(fmt.Sprintf("error uploading ECR repository policy: %v", err)) + } + } + + os.Setenv("PLUGIN_REPO", repo) + os.Setenv("PLUGIN_REGISTRY", registry) + os.Setenv("DOCKER_USERNAME", username) + os.Setenv("DOCKER_PASSWORD", password) + + // invoke the base docker plugin binary + cmd := exec.Command(docker.GetDroneDockerExecCmd()) + cmd.Stdout = os.Stdout + cmd.Stderr = os.Stderr + if err = cmd.Run(); err != nil { + logrus.Fatal(err) + } +} + +func trimHostname(repo, registry string) string { + repo = strings.TrimPrefix(repo, registry) + repo = strings.TrimLeft(repo, "/") + return repo +} + +func ensureRepoExists(svc *ecrpublic.ECRPublic, name string) (err error) { + input := &ecrpublic.CreateRepositoryInput{} + input.SetRepositoryName(name) + _, err = svc.CreateRepository(input) + if err != nil { + if aerr, ok := err.(awserr.Error); ok && aerr.Code() == ecrpublic.ErrCodeRepositoryAlreadyExistsException { + // eat it, we skip checking for existing to save two requests + err = nil + } + } + + return +} + +func uploadRepositoryPolicy(svc *ecrpublic.ECRPublic, repositoryPolicy string, name string) (err error) { + input := &ecrpublic.SetRepositoryPolicyInput{} + input.SetPolicyText(repositoryPolicy) + input.SetRepositoryName(name) + _, err = svc.SetRepositoryPolicy(input) + + return err +} + +func getAuthInfo(svc *ecrpublic.ECRPublic) (username, password string, err error) { + var result *ecrpublic.GetAuthorizationTokenOutput + var decoded []byte + + result, err = svc.GetAuthorizationToken(&ecrpublic.GetAuthorizationTokenInput{}) + if err != nil { + return + } + + auth := result.AuthorizationData + token := *auth.AuthorizationToken + decoded, err = base64.StdEncoding.DecodeString(token) + if err != nil { + return + } + + creds := strings.Split(string(decoded), ":") + username = creds[0] + password = creds[1] + return +} + +func parseBoolOrDefault(defaultValue bool, s string) (result bool) { + var err error + result, err = strconv.ParseBool(s) + if err != nil { + result = false + } + + return +} + +func getenv(key ...string) (s string) { + for _, k := range key { + s = os.Getenv(k) + if s != "" { + return + } + } + return +} + +func getECRClient(sess *session.Session, role string, externalId string) *ecrpublic.ECRPublic { + if role == "" { + return ecrpublic.New(sess) + } + if externalId != "" { + return ecrpublic.New(sess, &aws.Config{ + Credentials: stscreds.NewCredentials(sess, role, func(p *stscreds.AssumeRoleProvider) { + p.ExternalID = &externalId + }), + }) + } else { + return ecrpublic.New(sess, &aws.Config{ + Credentials: stscreds.NewCredentials(sess, role), + }) + } +} diff --git a/docker/ecr-public/Dockerfile.linux.amd64 b/docker/ecr-public/Dockerfile.linux.amd64 new file mode 100644 index 00000000..bf89b786 --- /dev/null +++ b/docker/ecr-public/Dockerfile.linux.amd64 @@ -0,0 +1,4 @@ +FROM plugins/docker:linux-amd64 + +ADD release/linux/amd64/drone-ecr-public /bin/ +ENTRYPOINT ["/usr/local/bin/dockerd-entrypoint.sh", "/bin/drone-ecr-public"] diff --git a/docker/ecr-public/Dockerfile.linux.arm b/docker/ecr-public/Dockerfile.linux.arm new file mode 100644 index 00000000..d9795377 --- /dev/null +++ b/docker/ecr-public/Dockerfile.linux.arm @@ -0,0 +1,4 @@ +FROM plugins/docker:linux-arm + +ADD release/linux/arm/drone-ecr-public /bin/ +ENTRYPOINT ["/usr/local/bin/dockerd-entrypoint.sh", "/bin/drone-ecr-public"] diff --git a/docker/ecr-public/Dockerfile.linux.arm64 b/docker/ecr-public/Dockerfile.linux.arm64 new file mode 100644 index 00000000..17e05ba2 --- /dev/null +++ b/docker/ecr-public/Dockerfile.linux.arm64 @@ -0,0 +1,4 @@ +FROM plugins/docker:linux-arm64 + +ADD release/linux/arm64/drone-ecr-public /bin/ +ENTRYPOINT ["/usr/local/bin/dockerd-entrypoint.sh", "/bin/drone-ecr-public"] diff --git a/docker/ecr-public/Dockerfile.windows.amd64.1803 b/docker/ecr-public/Dockerfile.windows.amd64.1803 new file mode 100644 index 00000000..92020dde --- /dev/null +++ b/docker/ecr-public/Dockerfile.windows.amd64.1803 @@ -0,0 +1,10 @@ +# escape=` +FROM plugins/docker:windows-1803-amd64 + +LABEL maintainer="Drone.IO Community " ` + org.label-schema.name="Drone ECR Public" ` + org.label-schema.vendor="Drone.IO Community" ` + org.label-schema.schema-version="1.0" + +ADD release/windows/amd64/drone-ecr-public.exe C:/bin/drone-ecr-public.exe +ENTRYPOINT [ "C:\\bin\\drone-ecr-public.exe" ] diff --git a/docker/ecr-public/Dockerfile.windows.amd64.1809 b/docker/ecr-public/Dockerfile.windows.amd64.1809 new file mode 100644 index 00000000..dddeb3cc --- /dev/null +++ b/docker/ecr-public/Dockerfile.windows.amd64.1809 @@ -0,0 +1,10 @@ +# escape=` +FROM plugins/docker:windows-1809-amd64 + +LABEL maintainer="Drone.IO Community " ` + org.label-schema.name="Drone ECR Public" ` + org.label-schema.vendor="Drone.IO Community" ` + org.label-schema.schema-version="1.0" + +ADD release/windows/amd64/drone-ecr-public.exe C:/bin/drone-ecr-public.exe +ENTRYPOINT [ "C:\\bin\\drone-ecr-public.exe" ] diff --git a/docker/ecr-public/Dockerfile.windows.amd64.1909 b/docker/ecr-public/Dockerfile.windows.amd64.1909 new file mode 100644 index 00000000..ebd75444 --- /dev/null +++ b/docker/ecr-public/Dockerfile.windows.amd64.1909 @@ -0,0 +1,10 @@ +# escape=` +FROM plugins/docker:windows-1909-amd64 + +LABEL maintainer="Drone.IO Community " ` + org.label-schema.name="Drone ECR Public" ` + org.label-schema.vendor="Drone.IO Community" ` + org.label-schema.schema-version="1.0" + +ADD release/windows/amd64/drone-ecr-public.exe C:/bin/drone-ecr-public.exe +ENTRYPOINT [ "C:\\bin\\drone-ecr-public.exe" ] diff --git a/docker/ecr-public/manifest.tmpl b/docker/ecr-public/manifest.tmpl new file mode 100644 index 00000000..96c08d68 --- /dev/null +++ b/docker/ecr-public/manifest.tmpl @@ -0,0 +1,49 @@ +image: plugins/ecr-public:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}} +{{#if build.tags}} +tags: +{{#each build.tags}} + - {{this}} +{{/each}} +{{/if}} +manifests: + - + image: plugins/ecr-public:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64 + platform: + architecture: amd64 + os: linux + - + image: plugins/ecr-public:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64 + platform: + architecture: arm64 + os: linux + variant: v8 + - + image: plugins/ecr-public:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm + platform: + architecture: arm + os: linux + variant: v7 + - + image: plugins/ecr-public:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1803-amd64 + platform: + architecture: amd64 + os: windows + version: 1803 + - + image: plugins/ecr-public:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1809-amd64 + platform: + architecture: amd64 + os: windows + version: 1809 + - + image: plugins/ecr-public:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1903-amd64 + platform: + architecture: amd64 + os: windows + version: 1903 + - + image: plugins/ecr-public:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1909-amd64 + platform: + architecture: amd64 + os: windows + version: 1909 diff --git a/go.mod b/go.mod index 4ab477ee..9273952e 100644 --- a/go.mod +++ b/go.mod @@ -1,7 +1,7 @@ module github.com/drone-plugins/drone-docker require ( - github.com/aws/aws-sdk-go v1.26.7 + github.com/aws/aws-sdk-go v1.35.37 github.com/coreos/go-semver v0.3.0 github.com/drone/drone-go v1.7.1 github.com/inhies/go-bytesize v0.0.0-20210819104631-275770b98743 @@ -12,12 +12,12 @@ require ( require ( github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d // indirect - github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af // indirect + github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/konsorten/go-windows-terminal-sequences v1.0.1 // indirect github.com/russross/blackfriday/v2 v2.0.1 // indirect github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect - golang.org/x/crypto v0.0.0-20180904163835-0709b304e793 // indirect - golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33 // indirect + golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 // indirect + golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f // indirect ) go 1.17 diff --git a/go.sum b/go.sum index 53c17333..9891e070 100644 --- a/go.sum +++ b/go.sum @@ -1,11 +1,12 @@ github.com/99designs/httpsignatures-go v0.0.0-20170731043157-88528bf4ca7e/go.mod h1:Xa6lInWHNQnuWoF0YPSsx+INFA9qk7/7pTjwb3PInkY= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/aws/aws-sdk-go v1.26.7 h1:ObjEnmzvSdYy8KVd3me7v/UMyCn81inLy2SyoIPoBkg= -github.com/aws/aws-sdk-go v1.26.7/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.35.37 h1:XA71k5PofXJ/eeXdWrTQiuWPEEyq8liguR+Y/QUELhI= +github.com/aws/aws-sdk-go v1.35.37/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/drone/drone-go v1.7.1 h1:ZX+3Rs8YHUSUQ5mkuMLmm1zr1ttiiE2YGNxF3AnyDKw= @@ -14,12 +15,15 @@ github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/inhies/go-bytesize v0.0.0-20210819104631-275770b98743 h1:X3Xxno5Ji8idrNiUoFc7QyXpqhSYlDRYQmc7mlpMBzU= github.com/inhies/go-bytesize v0.0.0-20210819104631-275770b98743/go.mod h1:KrtyD5PFj++GKkFS/7/RRrfnRhAMGQwy75GLCHWrCNs= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +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 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= @@ -28,15 +32,27 @@ github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5I github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.3.0 h1:hI/7Q+DtNZ2kINb6qt/lS+IyXnHQe9e90POfeewL/ME= github.com/sirupsen/logrus v1.3.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/urfave/cli v1.22.2 h1:gsqYFH8bb9ekPA12kRo0hfjngWQjkJPlN9R0N78BoUo= github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793 h1:u+LnwYTOOW7Ukr/fppxEb1Nwz0AtPflrblfvUudpo+I= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33 h1:I6FyU15t786LL7oL/hn43zqTuEGr4PN7F4XJ1p4E3Y8= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=