mirror of
https://github.com/drone-plugins/drone-docker.git
synced 2026-06-04 18:24:24 +08:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fbf27e6dc1 | |||
| be488f7c55 | |||
| 256ec37505 | |||
| 3e49e16f0d | |||
| d6c64364c4 | |||
| 8c5277ae89 | |||
| 385bfe2f7b | |||
| ffa3212940 | |||
| 78fc38da63 | |||
| 57234fcfd0 |
+30
-30
@@ -12,7 +12,7 @@ platform:
|
||||
|
||||
steps:
|
||||
- name: vet
|
||||
image: golang:1.22.4
|
||||
image: golang:1.23
|
||||
commands:
|
||||
- go vet ./...
|
||||
environment:
|
||||
@@ -22,7 +22,7 @@ steps:
|
||||
path: /go
|
||||
|
||||
- name: test
|
||||
image: golang:1.22.4
|
||||
image: golang:1.23
|
||||
commands:
|
||||
- go test -cover ./...
|
||||
environment:
|
||||
@@ -55,7 +55,7 @@ platform:
|
||||
|
||||
steps:
|
||||
- name: go build
|
||||
image: golang:1.22.4
|
||||
image: golang:1.23
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
commands:
|
||||
@@ -162,7 +162,7 @@ platform:
|
||||
|
||||
steps:
|
||||
- name: go build
|
||||
image: golang:1.22.7
|
||||
image: golang:1.23
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
commands:
|
||||
@@ -264,7 +264,7 @@ platform:
|
||||
|
||||
steps:
|
||||
- name: build-push
|
||||
image: golang:1.22.7
|
||||
image: golang:1.23
|
||||
commands:
|
||||
- 'go build -v -ldflags "-X main.version=${DRONE_COMMIT_SHA:0:8}" -a -tags netgo -o release/linux/amd64/drone-docker ./cmd/drone-docker'
|
||||
environment:
|
||||
@@ -275,7 +275,7 @@ steps:
|
||||
- tag
|
||||
|
||||
- name: build-tag
|
||||
image: golang:1.22.7
|
||||
image: golang:1.23
|
||||
commands:
|
||||
- 'go build -v -ldflags "-X main.version=${DRONE_TAG##v}" -a -tags netgo -o release/linux/amd64/drone-docker ./cmd/drone-docker'
|
||||
environment:
|
||||
@@ -285,7 +285,7 @@ steps:
|
||||
- tag
|
||||
|
||||
- name: executable
|
||||
image: golang:1.22.7
|
||||
image: golang:1.23
|
||||
commands:
|
||||
- ./release/linux/amd64/drone-docker --help
|
||||
|
||||
@@ -329,7 +329,7 @@ platform:
|
||||
|
||||
steps:
|
||||
- name: build-push
|
||||
image: golang:1.22.7
|
||||
image: golang:1.23
|
||||
commands:
|
||||
- 'go build -v -ldflags "-X main.version=${DRONE_COMMIT_SHA:0:8}" -a -tags netgo -o release/linux/arm64/drone-docker ./cmd/drone-docker'
|
||||
environment:
|
||||
@@ -340,7 +340,7 @@ steps:
|
||||
- tag
|
||||
|
||||
- name: build-tag
|
||||
image: golang:1.22.7
|
||||
image: golang:1.23
|
||||
commands:
|
||||
- 'go build -v -ldflags "-X main.version=${DRONE_TAG##v}" -a -tags netgo -o release/linux/arm64/drone-docker ./cmd/drone-docker'
|
||||
environment:
|
||||
@@ -350,7 +350,7 @@ steps:
|
||||
- tag
|
||||
|
||||
- name: executable
|
||||
image: golang:1.22.7
|
||||
image: golang:1.23
|
||||
commands:
|
||||
- ./release/linux/arm64/drone-docker --help
|
||||
|
||||
@@ -429,7 +429,7 @@ platform:
|
||||
|
||||
steps:
|
||||
- name: build-push
|
||||
image: golang:1.22.7
|
||||
image: golang:1.23
|
||||
commands:
|
||||
- 'go build -v -ldflags "-X main.version=${DRONE_COMMIT_SHA:0:8}" -a -tags netgo -o release/linux/amd64/drone-gcr ./cmd/drone-gcr'
|
||||
environment:
|
||||
@@ -440,7 +440,7 @@ steps:
|
||||
- tag
|
||||
|
||||
- name: build-tag
|
||||
image: golang:1.22.7
|
||||
image: golang:1.23
|
||||
commands:
|
||||
- 'go build -v -ldflags "-X main.version=${DRONE_TAG##v}" -a -tags netgo -o release/linux/amd64/drone-gcr ./cmd/drone-gcr'
|
||||
environment:
|
||||
@@ -488,7 +488,7 @@ platform:
|
||||
|
||||
steps:
|
||||
- name: build-push
|
||||
image: golang:1.22.7
|
||||
image: golang:1.23
|
||||
commands:
|
||||
- 'go build -v -ldflags "-X main.version=${DRONE_COMMIT_SHA:0:8}" -a -tags netgo -o release/linux/arm64/drone-gcr ./cmd/drone-gcr'
|
||||
environment:
|
||||
@@ -499,7 +499,7 @@ steps:
|
||||
- tag
|
||||
|
||||
- name: build-tag
|
||||
image: golang:1.22.7
|
||||
image: golang:1.23
|
||||
commands:
|
||||
- 'go build -v -ldflags "-X main.version=${DRONE_TAG##v}" -a -tags netgo -o release/linux/arm64/drone-gcr ./cmd/drone-gcr'
|
||||
environment:
|
||||
@@ -582,7 +582,7 @@ platform:
|
||||
|
||||
steps:
|
||||
- name: build-push
|
||||
image: golang:1.22.7
|
||||
image: golang:1.23
|
||||
commands:
|
||||
- 'go build -v -ldflags "-X main.version=${DRONE_COMMIT_SHA:0:8}" -a -tags netgo -o release/linux/amd64/drone-gar ./cmd/drone-gar'
|
||||
environment:
|
||||
@@ -593,7 +593,7 @@ steps:
|
||||
- tag
|
||||
|
||||
- name: build-tag
|
||||
image: golang:1.22.7
|
||||
image: golang:1.23
|
||||
commands:
|
||||
- 'go build -v -ldflags "-X main.version=${DRONE_TAG##v}" -a -tags netgo -o release/linux/amd64/drone-gar ./cmd/drone-gar'
|
||||
environment:
|
||||
@@ -641,7 +641,7 @@ platform:
|
||||
|
||||
steps:
|
||||
- name: build-push
|
||||
image: golang:1.22.7
|
||||
image: golang:1.23
|
||||
commands:
|
||||
- 'go build -v -ldflags "-X main.version=${DRONE_COMMIT_SHA:0:8}" -a -tags netgo -o release/linux/arm64/drone-gar ./cmd/drone-gar'
|
||||
environment:
|
||||
@@ -652,7 +652,7 @@ steps:
|
||||
- tag
|
||||
|
||||
- name: build-tag
|
||||
image: golang:1.22.7
|
||||
image: golang:1.23
|
||||
commands:
|
||||
- 'go build -v -ldflags "-X main.version=${DRONE_TAG##v}" -a -tags netgo -o release/linux/arm64/drone-gar ./cmd/drone-gar'
|
||||
environment:
|
||||
@@ -734,7 +734,7 @@ platform:
|
||||
|
||||
steps:
|
||||
- name: build-push
|
||||
image: golang:1.22.7
|
||||
image: golang:1.23
|
||||
commands:
|
||||
- 'go build -v -ldflags "-X main.version=${DRONE_COMMIT_SHA:0:8}" -a -tags netgo -o release/linux/amd64/drone-ecr ./cmd/drone-ecr'
|
||||
environment:
|
||||
@@ -744,7 +744,7 @@ steps:
|
||||
exclude:
|
||||
- tag
|
||||
- name: build-tag
|
||||
image: golang:1.22.7
|
||||
image: golang:1.23
|
||||
commands:
|
||||
- 'go build -v -ldflags "-X main.version=${DRONE_TAG##v}" -a -tags netgo -o release/linux/amd64/drone-ecr ./cmd/drone-ecr'
|
||||
environment:
|
||||
@@ -792,7 +792,7 @@ platform:
|
||||
|
||||
steps:
|
||||
- name: build-push
|
||||
image: golang:1.22.7
|
||||
image: golang:1.23
|
||||
commands:
|
||||
- 'go build -v -ldflags "-X main.version=${DRONE_COMMIT_SHA:0:8}" -a -tags netgo -o release/linux/arm64/drone-ecr ./cmd/drone-ecr'
|
||||
environment:
|
||||
@@ -802,7 +802,7 @@ steps:
|
||||
exclude:
|
||||
- tag
|
||||
- name: build-tag
|
||||
image: golang:1.22.7
|
||||
image: golang:1.23
|
||||
commands:
|
||||
- 'go build -v -ldflags "-X main.version=${DRONE_TAG##v}" -a -tags netgo -o release/linux/arm64/drone-ecr ./cmd/drone-ecr'
|
||||
environment:
|
||||
@@ -885,7 +885,7 @@ platform:
|
||||
|
||||
steps:
|
||||
- name: build-push
|
||||
image: golang:1.22.7
|
||||
image: golang:1.23
|
||||
commands:
|
||||
- 'go build -v -ldflags "-X main.version=${DRONE_COMMIT_SHA:0:8}" -a -tags netgo -o release/linux/amd64/drone-heroku ./cmd/drone-heroku'
|
||||
environment:
|
||||
@@ -895,7 +895,7 @@ steps:
|
||||
exclude:
|
||||
- tag
|
||||
- name: build-tag
|
||||
image: golang:1.22.7
|
||||
image: golang:1.23
|
||||
commands:
|
||||
- 'go build -v -ldflags "-X main.version=${DRONE_TAG##v}" -a -tags netgo -o release/linux/amd64/drone-heroku ./cmd/drone-heroku'
|
||||
environment:
|
||||
@@ -944,7 +944,7 @@ platform:
|
||||
|
||||
steps:
|
||||
- name: build-push
|
||||
image: golang:1.22.7
|
||||
image: golang:1.23
|
||||
commands:
|
||||
- 'go build -v -ldflags "-X main.version=${DRONE_COMMIT_SHA:0:8}" -a -tags netgo -o release/linux/arm64/drone-heroku ./cmd/drone-heroku'
|
||||
environment:
|
||||
@@ -954,7 +954,7 @@ steps:
|
||||
exclude:
|
||||
- tag
|
||||
- name: build-tag
|
||||
image: golang:1.22.7
|
||||
image: golang:1.23
|
||||
commands:
|
||||
- 'go build -v -ldflags "-X main.version=${DRONE_TAG##v}" -a -tags netgo -o release/linux/arm64/drone-heroku ./cmd/drone-heroku'
|
||||
environment:
|
||||
@@ -1035,7 +1035,7 @@ platform:
|
||||
|
||||
steps:
|
||||
- name: build-push
|
||||
image: golang:1.22.7
|
||||
image: golang:1.23
|
||||
commands:
|
||||
- 'go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -tags netgo -o release/linux/amd64/drone-acr ./cmd/drone-acr'
|
||||
environment:
|
||||
@@ -1045,7 +1045,7 @@ steps:
|
||||
exclude:
|
||||
- tag
|
||||
- name: build-tag
|
||||
image: golang:1.22.7
|
||||
image: golang:1.23
|
||||
commands:
|
||||
- 'go build -v -ldflags "-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}" -a -tags netgo -o release/linux/amd64/drone-acr ./cmd/drone-acr'
|
||||
environment:
|
||||
@@ -1093,7 +1093,7 @@ platform:
|
||||
|
||||
steps:
|
||||
- name: build-push
|
||||
image: golang:1.22.7
|
||||
image: golang:1.23
|
||||
commands:
|
||||
- 'go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -tags netgo -o release/linux/arm64/drone-acr ./cmd/drone-acr'
|
||||
environment:
|
||||
@@ -1104,7 +1104,7 @@ steps:
|
||||
- tag
|
||||
|
||||
- name: build-tag
|
||||
image: golang:1.22.7
|
||||
image: golang:1.23
|
||||
commands:
|
||||
- 'go build -v -ldflags "-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}" -a -tags netgo -o release/linux/arm64/drone-acr ./cmd/drone-acr'
|
||||
environment:
|
||||
|
||||
@@ -13,115 +13,3 @@ inputSet:
|
||||
type: PR
|
||||
spec:
|
||||
number: <+trigger.prNumber>
|
||||
stages:
|
||||
- parallel:
|
||||
- stage:
|
||||
identifier: linamd64
|
||||
type: CI
|
||||
spec:
|
||||
execution:
|
||||
steps:
|
||||
- step:
|
||||
identifier: Build_Push
|
||||
type: Run
|
||||
spec:
|
||||
command: go build -a -tags netgo -o release/linux/amd64/drone-<+matrix.repo> ./cmd/drone-<+matrix.repo>
|
||||
- step:
|
||||
identifier: Docker_Build_and_Push
|
||||
type: Plugin
|
||||
spec:
|
||||
settings:
|
||||
repo: plugins/<+matrix.repo>
|
||||
dockerfile: docker/<+matrix.repo>/Dockerfile.linux.amd64
|
||||
auto_tag_suffix: linux-amd64
|
||||
- step:
|
||||
identifier: BuildAndPushDockerRegistry_1
|
||||
type: BuildAndPushDockerRegistry
|
||||
spec:
|
||||
repo: plugins/<+matrix.repo>
|
||||
tags:
|
||||
- linux-amd64
|
||||
dockerfile: docker/<+matrix.repo>/Dockerfile.linux.amd64
|
||||
- stage:
|
||||
identifier: linarm64
|
||||
type: CI
|
||||
spec:
|
||||
execution:
|
||||
steps:
|
||||
- step:
|
||||
identifier: buildpush
|
||||
type: Run
|
||||
spec:
|
||||
command: go build -a -tags netgo -o release/linux/arm64/drone-<+matrix.repo> ./cmd/drone-<+matrix.repo>
|
||||
- step:
|
||||
identifier: Docker_Build_and_Push
|
||||
type: Plugin
|
||||
spec:
|
||||
settings:
|
||||
repo: plugins/<+matrix.repo>
|
||||
dockerfile: docker/<+matrix.repo>/Dockerfile.linux.arm64
|
||||
auto_tag_suffix: linux-arm64
|
||||
- step:
|
||||
identifier: BuildAndPushDockerRegistry_1
|
||||
type: BuildAndPushDockerRegistry
|
||||
spec:
|
||||
repo: plugins/<+matrix.repo>
|
||||
tags:
|
||||
- linux-arm64
|
||||
dockerfile: docker/<+matrix.repo>/Dockerfile.linux.arm64
|
||||
- stage:
|
||||
identifier: win1809amd64
|
||||
type: CI
|
||||
spec:
|
||||
execution:
|
||||
steps:
|
||||
- step:
|
||||
identifier: Docker_Build_and_Push1
|
||||
type: Plugin
|
||||
spec:
|
||||
settings:
|
||||
repo: plugins/<+matrix.repo>
|
||||
dockerfile: docker/<+matrix.repo>/Dockerfile.windows.amd64.1809
|
||||
auto_tag_suffix: windows-1809-amd64
|
||||
- step:
|
||||
identifier: BuildAndPushDockerRegistry_2
|
||||
type: BuildAndPushDockerRegistry
|
||||
spec:
|
||||
repo: plugins/<+matrix.repo>
|
||||
tags:
|
||||
- windows-1809-amd64
|
||||
dockerfile: docker/<+matrix.repo>/Dockerfile.windows.amd64.1809
|
||||
- stage:
|
||||
identifier: winamd64
|
||||
type: CI
|
||||
spec:
|
||||
execution:
|
||||
steps:
|
||||
- step:
|
||||
identifier: Docker_Build_and_Push1
|
||||
type: Plugin
|
||||
spec:
|
||||
settings:
|
||||
repo: plugins/<+matrix.repo>
|
||||
dockerfile: docker/<+matrix.repo>/Dockerfile.windows.amd64.ltsc2022
|
||||
auto_tag_suffix: windows-ltsc2022-amd64
|
||||
- step:
|
||||
identifier: BuildAndPushDockerRegistry_2
|
||||
type: BuildAndPushDockerRegistry
|
||||
spec:
|
||||
repo: plugins/<+matrix.repo>
|
||||
tags:
|
||||
- windows-ltsc2022-amd64
|
||||
dockerfile: docker/<+matrix.repo>/Dockerfile.windows.amd64.ltsc2022
|
||||
- stage:
|
||||
identifier: Manifest
|
||||
type: CI
|
||||
spec:
|
||||
execution:
|
||||
steps:
|
||||
- step:
|
||||
identifier: Plugin_1
|
||||
type: Plugin
|
||||
spec:
|
||||
settings:
|
||||
spec: docker/<+matrix.repo>/manifest.tmpl
|
||||
|
||||
@@ -13,115 +13,3 @@ inputSet:
|
||||
type: branch
|
||||
spec:
|
||||
branch: <+trigger.branch>
|
||||
stages:
|
||||
- parallel:
|
||||
- stage:
|
||||
identifier: linamd64
|
||||
type: CI
|
||||
spec:
|
||||
execution:
|
||||
steps:
|
||||
- step:
|
||||
identifier: Build_Push
|
||||
type: Run
|
||||
spec:
|
||||
command: go build -a -tags netgo -o release/linux/amd64/drone-<+matrix.repo> ./cmd/drone-<+matrix.repo>
|
||||
- step:
|
||||
identifier: Docker_Build_and_Push
|
||||
type: Plugin
|
||||
spec:
|
||||
settings:
|
||||
repo: plugins/<+matrix.repo>
|
||||
dockerfile: docker/<+matrix.repo>/Dockerfile.linux.amd64
|
||||
auto_tag_suffix: linux-amd64
|
||||
- step:
|
||||
identifier: BuildAndPushDockerRegistry_1
|
||||
type: BuildAndPushDockerRegistry
|
||||
spec:
|
||||
repo: plugins/<+matrix.repo>
|
||||
tags:
|
||||
- linux-amd64
|
||||
dockerfile: docker/<+matrix.repo>/Dockerfile.linux.amd64
|
||||
- stage:
|
||||
identifier: linarm64
|
||||
type: CI
|
||||
spec:
|
||||
execution:
|
||||
steps:
|
||||
- step:
|
||||
identifier: buildpush
|
||||
type: Run
|
||||
spec:
|
||||
command: go build -a -tags netgo -o release/linux/arm64/drone-<+matrix.repo> ./cmd/drone-<+matrix.repo>
|
||||
- step:
|
||||
identifier: Docker_Build_and_Push
|
||||
type: Plugin
|
||||
spec:
|
||||
settings:
|
||||
repo: plugins/<+matrix.repo>
|
||||
dockerfile: docker/<+matrix.repo>/Dockerfile.linux.arm64
|
||||
auto_tag_suffix: linux-arm64
|
||||
- step:
|
||||
identifier: BuildAndPushDockerRegistry_1
|
||||
type: BuildAndPushDockerRegistry
|
||||
spec:
|
||||
repo: plugins/<+matrix.repo>
|
||||
tags:
|
||||
- linux-arm64
|
||||
dockerfile: docker/<+matrix.repo>/Dockerfile.linux.arm64
|
||||
- stage:
|
||||
identifier: win1809amd64
|
||||
type: CI
|
||||
spec:
|
||||
execution:
|
||||
steps:
|
||||
- step:
|
||||
identifier: Docker_Build_and_Push1
|
||||
type: Plugin
|
||||
spec:
|
||||
settings:
|
||||
repo: plugins/<+matrix.repo>
|
||||
dockerfile: docker/<+matrix.repo>/Dockerfile.windows.amd64.1809
|
||||
auto_tag_suffix: windows-1809-amd64
|
||||
- step:
|
||||
identifier: BuildAndPushDockerRegistry_2
|
||||
type: BuildAndPushDockerRegistry
|
||||
spec:
|
||||
repo: plugins/<+matrix.repo>
|
||||
tags:
|
||||
- windows-1809-amd64
|
||||
dockerfile: docker/<+matrix.repo>/Dockerfile.windows.amd64.1809
|
||||
- stage:
|
||||
identifier: winamd64
|
||||
type: CI
|
||||
spec:
|
||||
execution:
|
||||
steps:
|
||||
- step:
|
||||
identifier: Docker_Build_and_Push1
|
||||
type: Plugin
|
||||
spec:
|
||||
settings:
|
||||
repo: plugins/<+matrix.repo>
|
||||
dockerfile: docker/<+matrix.repo>/Dockerfile.windows.amd64.ltsc2022
|
||||
auto_tag_suffix: windows-ltsc2022-amd64
|
||||
- step:
|
||||
identifier: BuildAndPushDockerRegistry_2
|
||||
type: BuildAndPushDockerRegistry
|
||||
spec:
|
||||
repo: plugins/<+matrix.repo>
|
||||
tags:
|
||||
- windows-ltsc2022-amd64
|
||||
dockerfile: docker/<+matrix.repo>/Dockerfile.windows.amd64.ltsc2022
|
||||
- stage:
|
||||
identifier: Manifest
|
||||
type: CI
|
||||
spec:
|
||||
execution:
|
||||
steps:
|
||||
- step:
|
||||
identifier: Plugin_1
|
||||
type: Plugin
|
||||
spec:
|
||||
settings:
|
||||
spec: docker/<+matrix.repo>/manifest.tmpl
|
||||
|
||||
@@ -13,115 +13,3 @@ inputSet:
|
||||
type: tag
|
||||
spec:
|
||||
tag: <+trigger.tag>
|
||||
stages:
|
||||
- parallel:
|
||||
- stage:
|
||||
identifier: linamd64
|
||||
type: CI
|
||||
spec:
|
||||
execution:
|
||||
steps:
|
||||
- step:
|
||||
identifier: Build_Push
|
||||
type: Run
|
||||
spec:
|
||||
command: go build -a -tags netgo -o release/linux/amd64/drone-<+matrix.repo> ./cmd/drone-<+matrix.repo>
|
||||
- step:
|
||||
identifier: Docker_Build_and_Push
|
||||
type: Plugin
|
||||
spec:
|
||||
settings:
|
||||
repo: plugins/<+matrix.repo>
|
||||
dockerfile: docker/<+matrix.repo>/Dockerfile.linux.amd64
|
||||
auto_tag_suffix: linux-amd64
|
||||
- step:
|
||||
identifier: BuildAndPushDockerRegistry_1
|
||||
type: BuildAndPushDockerRegistry
|
||||
spec:
|
||||
repo: plugins/<+matrix.repo>
|
||||
tags:
|
||||
- linux-amd64
|
||||
dockerfile: docker/<+matrix.repo>/Dockerfile.linux.amd64
|
||||
- stage:
|
||||
identifier: linarm64
|
||||
type: CI
|
||||
spec:
|
||||
execution:
|
||||
steps:
|
||||
- step:
|
||||
identifier: buildpush
|
||||
type: Run
|
||||
spec:
|
||||
command: go build -a -tags netgo -o release/linux/arm64/drone-<+matrix.repo> ./cmd/drone-<+matrix.repo>
|
||||
- step:
|
||||
identifier: Docker_Build_and_Push
|
||||
type: Plugin
|
||||
spec:
|
||||
settings:
|
||||
repo: plugins/<+matrix.repo>
|
||||
dockerfile: docker/<+matrix.repo>/Dockerfile.linux.arm64
|
||||
auto_tag_suffix: linux-arm64
|
||||
- step:
|
||||
identifier: BuildAndPushDockerRegistry_1
|
||||
type: BuildAndPushDockerRegistry
|
||||
spec:
|
||||
repo: plugins/<+matrix.repo>
|
||||
tags:
|
||||
- linux-arm64
|
||||
dockerfile: docker/<+matrix.repo>/Dockerfile.linux.arm64
|
||||
- stage:
|
||||
identifier: win1809amd64
|
||||
type: CI
|
||||
spec:
|
||||
execution:
|
||||
steps:
|
||||
- step:
|
||||
identifier: Docker_Build_and_Push1
|
||||
type: Plugin
|
||||
spec:
|
||||
settings:
|
||||
repo: plugins/<+matrix.repo>
|
||||
dockerfile: docker/<+matrix.repo>/Dockerfile.windows.amd64.1809
|
||||
auto_tag_suffix: windows-1809-amd64
|
||||
- step:
|
||||
identifier: BuildAndPushDockerRegistry_2
|
||||
type: BuildAndPushDockerRegistry
|
||||
spec:
|
||||
repo: plugins/<+matrix.repo>
|
||||
tags:
|
||||
- windows-1809-amd64
|
||||
dockerfile: docker/<+matrix.repo>/Dockerfile.windows.amd64.1809
|
||||
- stage:
|
||||
identifier: winamd64
|
||||
type: CI
|
||||
spec:
|
||||
execution:
|
||||
steps:
|
||||
- step:
|
||||
identifier: Docker_Build_and_Push1
|
||||
type: Plugin
|
||||
spec:
|
||||
settings:
|
||||
repo: plugins/<+matrix.repo>
|
||||
dockerfile: docker/<+matrix.repo>/Dockerfile.windows.amd64.ltsc2022
|
||||
auto_tag_suffix: windows-ltsc2022-amd64
|
||||
- step:
|
||||
identifier: BuildAndPushDockerRegistry_2
|
||||
type: BuildAndPushDockerRegistry
|
||||
spec:
|
||||
repo: plugins/<+matrix.repo>
|
||||
tags:
|
||||
- windows-ltsc2022-amd64
|
||||
dockerfile: docker/<+matrix.repo>/Dockerfile.windows.amd64.ltsc2022
|
||||
- stage:
|
||||
identifier: Manifest
|
||||
type: CI
|
||||
spec:
|
||||
execution:
|
||||
steps:
|
||||
- step:
|
||||
identifier: Plugin_1
|
||||
type: Plugin
|
||||
spec:
|
||||
settings:
|
||||
spec: docker/<+matrix.repo>/manifest.tmpl
|
||||
|
||||
+162
-97
@@ -32,8 +32,8 @@ pipeline:
|
||||
name: GO VET
|
||||
identifier: Run_1
|
||||
spec:
|
||||
connectorRef: account.harnessImage
|
||||
image: golang:1.22.4
|
||||
connectorRef: Plugins_Docker_Hub_Connector
|
||||
image: golang:1.23.0
|
||||
shell: Sh
|
||||
command: go vet ./...
|
||||
- step:
|
||||
@@ -41,8 +41,8 @@ pipeline:
|
||||
name: GO TEST
|
||||
identifier: Run_2
|
||||
spec:
|
||||
connectorRef: account.harnessImage
|
||||
image: golang:1.22.4
|
||||
connectorRef: Plugins_Docker_Hub_Connector
|
||||
image: golang:1.23.0
|
||||
shell: Sh
|
||||
command: go test -cover ./...
|
||||
- parallel:
|
||||
@@ -69,12 +69,21 @@ pipeline:
|
||||
name: Build Binary
|
||||
identifier: Build_Push
|
||||
spec:
|
||||
connectorRef: account.harnessImage
|
||||
image: golang:1.22.4
|
||||
connectorRef: Plugins_Docker_Hub_Connector
|
||||
image: golang:1.23.0
|
||||
shell: Sh
|
||||
command: <+input>
|
||||
command: go build -a -tags netgo -o release/linux/amd64/drone-<+matrix.repo> ./cmd/drone-<+matrix.repo>
|
||||
envVariables:
|
||||
CGO_ENABLED: "0"
|
||||
strategy:
|
||||
matrix:
|
||||
repo:
|
||||
- docker
|
||||
- gcr
|
||||
- gar
|
||||
- ecr
|
||||
- heroku
|
||||
- acr
|
||||
- step:
|
||||
type: Plugin
|
||||
name: Build and Push on Tag
|
||||
@@ -85,35 +94,45 @@ pipeline:
|
||||
settings:
|
||||
username: drone
|
||||
password: <+secrets.getValue("Plugins_Docker_Hub_Pat")>
|
||||
repo: <+input>
|
||||
dockerfile: <+input>
|
||||
repo: plugins/<+matrix.repo>
|
||||
dockerfile: docker/<+matrix.repo>/Dockerfile.linux.amd64
|
||||
auto_tag: "true"
|
||||
auto_tag_suffix: <+input>
|
||||
auto_tag_suffix: linux-amd64
|
||||
when:
|
||||
stageStatus: Success
|
||||
condition: <+codebase.build.type> == "tag"
|
||||
strategy:
|
||||
matrix:
|
||||
repo:
|
||||
- docker
|
||||
- gcr
|
||||
- gar
|
||||
- ecr
|
||||
- heroku
|
||||
- acr
|
||||
- step:
|
||||
type: BuildAndPushDockerRegistry
|
||||
name: Build and Push on Branch
|
||||
identifier: BuildAndPushDockerRegistry_1
|
||||
spec:
|
||||
connectorRef: Plugins_Docker_Hub_Connector
|
||||
repo: <+input>
|
||||
tags: <+input>
|
||||
caching: true
|
||||
dockerfile: <+input>
|
||||
repo: plugins/<+matrix.repo>
|
||||
tags:
|
||||
- linux-amd64
|
||||
caching: false
|
||||
dockerfile: docker/<+matrix.repo>/Dockerfile.linux.amd64
|
||||
when:
|
||||
stageStatus: Success
|
||||
condition: <+codebase.build.type> == "branch"
|
||||
strategy:
|
||||
matrix:
|
||||
repo:
|
||||
- docker
|
||||
- gcr
|
||||
- gar
|
||||
- ecr
|
||||
- heroku
|
||||
- acr
|
||||
strategy:
|
||||
matrix:
|
||||
repo:
|
||||
- docker
|
||||
- gcr
|
||||
- gar
|
||||
- ecr
|
||||
- heroku
|
||||
- acr
|
||||
- stage:
|
||||
name: linux-arm64
|
||||
identifier: linarm64
|
||||
@@ -137,12 +156,21 @@ pipeline:
|
||||
name: Build Binary
|
||||
identifier: buildpush
|
||||
spec:
|
||||
connectorRef: account.harnessImage
|
||||
image: golang:1.22.4
|
||||
connectorRef: Plugins_Docker_Hub_Connector
|
||||
image: golang:1.23.0
|
||||
shell: Sh
|
||||
command: <+input>
|
||||
command: go build -a -tags netgo -o release/linux/arm64/drone-<+matrix.repo> ./cmd/drone-<+matrix.repo>
|
||||
envVariables:
|
||||
CGO_ENABLED: "0"
|
||||
strategy:
|
||||
matrix:
|
||||
repo:
|
||||
- docker
|
||||
- gcr
|
||||
- gar
|
||||
- ecr
|
||||
- heroku
|
||||
- acr
|
||||
- step:
|
||||
type: Plugin
|
||||
name: Build and Push on Tag
|
||||
@@ -153,35 +181,45 @@ pipeline:
|
||||
settings:
|
||||
username: drone
|
||||
password: <+secrets.getValue("Plugins_Docker_Hub_Pat")>
|
||||
repo: <+input>
|
||||
dockerfile: <+input>
|
||||
repo: plugins/<+matrix.repo>
|
||||
dockerfile: docker/<+matrix.repo>/Dockerfile.linux.arm64
|
||||
auto_tag: "true"
|
||||
auto_tag_suffix: <+input>
|
||||
auto_tag_suffix: linux-arm64
|
||||
when:
|
||||
stageStatus: Success
|
||||
condition: <+codebase.build.type> == "tag"
|
||||
strategy:
|
||||
matrix:
|
||||
repo:
|
||||
- docker
|
||||
- gcr
|
||||
- gar
|
||||
- ecr
|
||||
- heroku
|
||||
- acr
|
||||
- step:
|
||||
type: BuildAndPushDockerRegistry
|
||||
name: Build and Push on Branch
|
||||
identifier: BuildAndPushDockerRegistry_1
|
||||
spec:
|
||||
connectorRef: Plugins_Docker_Hub_Connector
|
||||
repo: <+input>
|
||||
tags: <+input>
|
||||
caching: true
|
||||
dockerfile: <+input>
|
||||
repo: plugins/<+matrix.repo>
|
||||
tags:
|
||||
- linux-arm64
|
||||
caching: false
|
||||
dockerfile: docker/<+matrix.repo>/Dockerfile.linux.arm64
|
||||
when:
|
||||
stageStatus: Success
|
||||
condition: <+codebase.build.type> == "branch"
|
||||
strategy:
|
||||
matrix:
|
||||
repo:
|
||||
- docker
|
||||
- gcr
|
||||
- gar
|
||||
- ecr
|
||||
- heroku
|
||||
- acr
|
||||
strategy:
|
||||
matrix:
|
||||
repo:
|
||||
- docker
|
||||
- gcr
|
||||
- gar
|
||||
- ecr
|
||||
- heroku
|
||||
- acr
|
||||
- stage:
|
||||
name: win-1809-amd64
|
||||
identifier: win1809amd64
|
||||
@@ -205,18 +243,22 @@ pipeline:
|
||||
name: Build Binary
|
||||
identifier: go_build
|
||||
spec:
|
||||
connectorRef: account.harnessImage
|
||||
image: golang:1.22.4
|
||||
connectorRef: Plugins_Docker_Hub_Connector
|
||||
image: golang:1.23.0
|
||||
shell: Sh
|
||||
command: |-
|
||||
# disable cgo
|
||||
export CGO_ENABLED=0
|
||||
|
||||
go build -o release/windows/amd64/drone-docker.exe ./cmd/drone-docker
|
||||
go build -o release/windows/amd64/drone-ecr.exe ./cmd/drone-ecr
|
||||
go build -o release/windows/amd64/drone-gcr.exe ./cmd/drone-gcr
|
||||
go build -o release/windows/amd64/drone-acr.exe ./cmd/drone-acr
|
||||
go build -o release/windows/amd64/drone-gar.exe ./cmd/drone-gar
|
||||
go build -o release/windows/amd64/drone-<+matrix.repo>.exe ./cmd/drone-<+matrix.repo>
|
||||
strategy:
|
||||
matrix:
|
||||
repo:
|
||||
- docker
|
||||
- gcr
|
||||
- gar
|
||||
- ecr
|
||||
- acr
|
||||
- step:
|
||||
type: Plugin
|
||||
name: Build and Push on Tag
|
||||
@@ -227,34 +269,43 @@ pipeline:
|
||||
settings:
|
||||
username: drone
|
||||
password: <+secrets.getValue("Plugins_Docker_Hub_Pat")>
|
||||
repo: <+input>
|
||||
dockerfile: <+input>
|
||||
repo: plugins/<+matrix.repo>
|
||||
dockerfile: docker/<+matrix.repo>/Dockerfile.windows.amd64.1809
|
||||
auto_tag: "true"
|
||||
auto_tag_suffix: <+input>
|
||||
auto_tag_suffix: windows-1809-amd64
|
||||
when:
|
||||
stageStatus: Success
|
||||
condition: <+codebase.build.type> == "tag"
|
||||
strategy:
|
||||
matrix:
|
||||
repo:
|
||||
- docker
|
||||
- gcr
|
||||
- gar
|
||||
- ecr
|
||||
- acr
|
||||
- step:
|
||||
type: BuildAndPushDockerRegistry
|
||||
name: Build and Push on Branch
|
||||
identifier: BuildAndPushDockerRegistry_2
|
||||
spec:
|
||||
connectorRef: Plugins_Docker_Hub_Connector
|
||||
repo: <+input>
|
||||
tags: <+input>
|
||||
caching: true
|
||||
dockerfile: <+input>
|
||||
repo: plugins/<+matrix.repo>
|
||||
tags:
|
||||
- windows-1809-amd64
|
||||
caching: false
|
||||
dockerfile: docker/<+matrix.repo>/Dockerfile.windows.amd64.1809
|
||||
when:
|
||||
stageStatus: Success
|
||||
condition: <+codebase.build.type> == "branch"
|
||||
strategy:
|
||||
matrix:
|
||||
repo:
|
||||
- docker
|
||||
- gcr
|
||||
- gar
|
||||
- ecr
|
||||
- acr
|
||||
strategy:
|
||||
matrix:
|
||||
repo:
|
||||
- docker
|
||||
- gcr
|
||||
- gar
|
||||
- ecr
|
||||
- acr
|
||||
delegateSelectors:
|
||||
- windows-vm
|
||||
- stage:
|
||||
@@ -280,20 +331,24 @@ pipeline:
|
||||
name: Build Binary -ltsc2022
|
||||
identifier: build_amd64ltsc2022
|
||||
spec:
|
||||
connectorRef: account.harnessImage
|
||||
image: golang:1.22.4
|
||||
connectorRef: Plugins_Docker_Hub_Connector
|
||||
image: golang:1.23.0
|
||||
shell: Sh
|
||||
command: |-
|
||||
# disable cgo
|
||||
export CGO_ENABLED=0
|
||||
|
||||
go build -o release/windows/amd64/drone-docker.exe ./cmd/drone-docker
|
||||
go build -o release/windows/amd64/drone-ecr.exe ./cmd/drone-ecr
|
||||
go build -o release/windows/amd64/drone-gcr.exe ./cmd/drone-gcr
|
||||
go build -o release/windows/amd64/drone-acr.exe ./cmd/drone-acr
|
||||
go build -o release/windows/amd64/drone-gar.exe ./cmd/drone-gar
|
||||
go build -o release/windows/amd64/drone-<+matrix.repo>.exe ./cmd/drone-<+matrix.repo>
|
||||
envVariables:
|
||||
CGO_ENABLED: "0"
|
||||
strategy:
|
||||
matrix:
|
||||
repo:
|
||||
- docker
|
||||
- gcr
|
||||
- gar
|
||||
- ecr
|
||||
- acr
|
||||
- step:
|
||||
type: Plugin
|
||||
name: Build and Push on Tag
|
||||
@@ -304,36 +359,45 @@ pipeline:
|
||||
settings:
|
||||
username: drone
|
||||
password: <+secrets.getValue("Plugins_Docker_Hub_Pat")>
|
||||
repo: <+input>
|
||||
dockerfile: <+input>
|
||||
repo: plugins/<+matrix.repo>
|
||||
dockerfile: docker/<+matrix.repo>/Dockerfile.windows.amd64.ltsc2022
|
||||
auto_tag: "true"
|
||||
auto_tag_suffix: <+input>
|
||||
auto_tag_suffix: windows-ltsc2022-amd64
|
||||
when:
|
||||
stageStatus: Success
|
||||
condition: <+codebase.build.type> == "tag"
|
||||
strategy:
|
||||
matrix:
|
||||
repo:
|
||||
- docker
|
||||
- gcr
|
||||
- gar
|
||||
- ecr
|
||||
- acr
|
||||
- step:
|
||||
type: BuildAndPushDockerRegistry
|
||||
name: Build and Push on Branch
|
||||
identifier: BuildAndPushDockerRegistry_2
|
||||
spec:
|
||||
connectorRef: Plugins_Docker_Hub_Connector
|
||||
repo: <+input>
|
||||
tags: <+input>
|
||||
caching: true
|
||||
dockerfile: <+input>
|
||||
repo: plugins/<+matrix.repo>
|
||||
tags:
|
||||
- windows-ltsc2022-amd64
|
||||
caching: false
|
||||
dockerfile: docker/<+matrix.repo>/Dockerfile.windows.amd64.ltsc2022
|
||||
when:
|
||||
stageStatus: Success
|
||||
condition: <+codebase.build.type> == "branch"
|
||||
strategy:
|
||||
matrix:
|
||||
repo:
|
||||
- docker
|
||||
- gcr
|
||||
- gar
|
||||
- ecr
|
||||
- acr
|
||||
buildIntelligence:
|
||||
enabled: false
|
||||
strategy:
|
||||
matrix:
|
||||
repo:
|
||||
- docker
|
||||
- gcr
|
||||
- gar
|
||||
- ecr
|
||||
- acr
|
||||
- stage:
|
||||
name: Manifest and Release
|
||||
identifier: Manifest
|
||||
@@ -358,25 +422,26 @@ pipeline:
|
||||
password: <+secrets.getValue("Plugins_Docker_Hub_Pat")>
|
||||
auto_tag: "true"
|
||||
ignore_missing: "true"
|
||||
spec: <+input>
|
||||
spec: docker/<+matrix.repo>/manifest.tmpl
|
||||
when:
|
||||
stageStatus: Success
|
||||
condition: <+codebase.build.type> == "tag" || <+codebase.build.type> == "branch"
|
||||
condition: <+codebase.build.type> == "tag"
|
||||
strategy:
|
||||
matrix:
|
||||
repo:
|
||||
- docker
|
||||
- gcr
|
||||
- gar
|
||||
- ecr
|
||||
- heroku
|
||||
- acr
|
||||
platform:
|
||||
os: Linux
|
||||
arch: Amd64
|
||||
runtime:
|
||||
type: Cloud
|
||||
spec: {}
|
||||
strategy:
|
||||
matrix:
|
||||
repo:
|
||||
- docker
|
||||
- gcr
|
||||
- gar
|
||||
- ecr
|
||||
- heroku
|
||||
- acr
|
||||
identifier: dronedockerharness
|
||||
projectIdentifier: Drone_Plugins
|
||||
name: drone-docker-harness
|
||||
allowStageExecutions: true
|
||||
|
||||
@@ -1,17 +1,51 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
|
||||
"github.com/joho/godotenv"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
docker "github.com/drone-plugins/drone-docker"
|
||||
)
|
||||
|
||||
type subscriptionUrlResponse struct {
|
||||
Value []struct {
|
||||
ID string `json:"id"`
|
||||
} `json:"value"`
|
||||
}
|
||||
|
||||
const (
|
||||
acrCertFile = "acr-cert.pem"
|
||||
azSubscriptionApiVersion = "2021-04-01"
|
||||
azSubscriptionBaseUrl = "https://management.azure.com/subscriptions/"
|
||||
basePublicUrl = "https://portal.azure.com/#view/Microsoft_Azure_ContainerRegistries/TagMetadataBlade/registryId/"
|
||||
defaultUsername = "00000000-0000-0000-0000-000000000000"
|
||||
|
||||
// Environment variable names for Azure Environment Credential
|
||||
clientIdEnv = "AZURE_CLIENT_ID"
|
||||
clientSecretKeyEnv = "AZURE_CLIENT_SECRET"
|
||||
tenantKeyEnv = "AZURE_TENANT_ID"
|
||||
certPathEnv = "AZURE_CLIENT_CERTIFICATE_PATH"
|
||||
)
|
||||
|
||||
var (
|
||||
acrCertPath = filepath.Join(os.TempDir(), acrCertFile)
|
||||
)
|
||||
|
||||
func main() {
|
||||
// Load env-file if it exists first
|
||||
if env := os.Getenv("PLUGIN_ENV_FILE"); env != "" {
|
||||
@@ -21,8 +55,19 @@ func main() {
|
||||
var (
|
||||
repo = getenv("PLUGIN_REPO")
|
||||
registry = getenv("PLUGIN_REGISTRY")
|
||||
|
||||
// If these credentials are provided, they will be directly used
|
||||
// for docker login
|
||||
username = getenv("SERVICE_PRINCIPAL_CLIENT_ID")
|
||||
password = getenv("SERVICE_PRINCIPAL_CLIENT_SECRET")
|
||||
|
||||
// Service principal credentials
|
||||
clientId = getenv("CLIENT_ID")
|
||||
clientSecret = getenv("CLIENT_SECRET")
|
||||
clientCert = getenv("CLIENT_CERTIFICATE")
|
||||
tenantId = getenv("TENANT_ID")
|
||||
subscriptionId = getenv("SUBSCRIPTION_ID")
|
||||
publicUrl = getenv("DAEMON_REGISTRY")
|
||||
)
|
||||
|
||||
// default registry value
|
||||
@@ -30,6 +75,17 @@ func main() {
|
||||
registry = "azurecr.io"
|
||||
}
|
||||
|
||||
// Get auth if username and password is not specified
|
||||
if username == "" && password == "" {
|
||||
// docker login credentials are not provided
|
||||
var err error
|
||||
username = defaultUsername
|
||||
password, publicUrl, err = getAuth(clientId, clientSecret, clientCert, tenantId, subscriptionId, registry)
|
||||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
// must use the fully qualified repo name. If the
|
||||
// repo name does not have the registry prefix we
|
||||
// should prepend.
|
||||
@@ -42,6 +98,11 @@ func main() {
|
||||
os.Setenv("DOCKER_USERNAME", username)
|
||||
os.Setenv("DOCKER_PASSWORD", password)
|
||||
os.Setenv("PLUGIN_REGISTRY_TYPE", "ACR")
|
||||
if publicUrl != "" {
|
||||
// Set this env variable if public URL for artifact is available
|
||||
// If not, we will fall back to registry url
|
||||
os.Setenv("ARTIFACT_REGISTRY", publicUrl)
|
||||
}
|
||||
|
||||
// invoke the base docker plugin binary
|
||||
cmd := exec.Command(docker.GetDroneDockerExecCmd())
|
||||
@@ -53,6 +114,157 @@ func main() {
|
||||
}
|
||||
}
|
||||
|
||||
func getAuth(clientId, clientSecret, clientCert, tenantId, subscriptionId, registry string) (string, string, error) {
|
||||
// Verify inputs
|
||||
if tenantId == "" {
|
||||
return "", "", fmt.Errorf("tenantId cannot be empty for AAD authentication")
|
||||
}
|
||||
if clientId == "" {
|
||||
return "", "", fmt.Errorf("clientId cannot be empty for AAD authentication")
|
||||
}
|
||||
if clientSecret == "" && clientCert == "" {
|
||||
return "", "", fmt.Errorf("one of client secret or client cert should be defined")
|
||||
}
|
||||
|
||||
// Setup cert
|
||||
if clientCert != "" {
|
||||
err := setupACRCert(clientCert, acrCertPath)
|
||||
if err != nil {
|
||||
errors.Wrap(err, "failed to push setup cert file")
|
||||
}
|
||||
}
|
||||
|
||||
// Get AZ env
|
||||
if err := os.Setenv(clientIdEnv, clientId); err != nil {
|
||||
return "", "", errors.Wrap(err, "failed to set env variable client Id")
|
||||
}
|
||||
if err := os.Setenv(clientSecretKeyEnv, clientSecret); err != nil {
|
||||
return "", "", errors.Wrap(err, "failed to set env variable client secret")
|
||||
}
|
||||
if err := os.Setenv(tenantKeyEnv, tenantId); err != nil {
|
||||
return "", "", errors.Wrap(err, "failed to set env variable tenant Id")
|
||||
}
|
||||
if err := os.Setenv(certPathEnv, acrCertPath); err != nil {
|
||||
return "", "", errors.Wrap(err, "failed to set env variable cert path")
|
||||
}
|
||||
env, err := azidentity.NewEnvironmentCredential(nil)
|
||||
if err != nil {
|
||||
return "", "", errors.Wrap(err, "failed to get env credentials from azure")
|
||||
}
|
||||
os.Unsetenv(clientIdEnv)
|
||||
os.Unsetenv(clientSecretKeyEnv)
|
||||
os.Unsetenv(tenantKeyEnv)
|
||||
os.Unsetenv(certPathEnv)
|
||||
|
||||
// Fetch AAD token
|
||||
policy := policy.TokenRequestOptions{
|
||||
Scopes: []string{"https://management.azure.com/.default"},
|
||||
}
|
||||
aadToken, err := env.GetToken(context.Background(), policy)
|
||||
if err != nil {
|
||||
return "", "", errors.Wrap(err, "failed to fetch access token")
|
||||
}
|
||||
|
||||
// Get public URL for artifacts
|
||||
publicUrl, err := getPublicUrl(aadToken.Token, registry, subscriptionId)
|
||||
if err != nil {
|
||||
// execution should not fail because of this error
|
||||
fmt.Fprintf(os.Stderr, "failed to get public url with error: %s\n", err)
|
||||
}
|
||||
|
||||
// Fetch token
|
||||
ACRToken, err := fetchACRToken(tenantId, aadToken.Token, registry)
|
||||
if err != nil {
|
||||
return "", "", errors.Wrap(err, "failed to fetch ACR token")
|
||||
}
|
||||
return ACRToken, publicUrl, nil
|
||||
}
|
||||
|
||||
func fetchACRToken(tenantId, token, registry string) (string, error) {
|
||||
// oauth exchange
|
||||
formData := url.Values{
|
||||
"grant_type": {"access_token"},
|
||||
"service": {registry},
|
||||
"tenant": {tenantId},
|
||||
"access_token": {token},
|
||||
}
|
||||
jsonResponse, err := http.PostForm(fmt.Sprintf("https://%s/oauth2/exchange", registry), formData)
|
||||
if err != nil || jsonResponse == nil {
|
||||
return "", errors.Wrap(err, "failed to fetch ACR token")
|
||||
}
|
||||
|
||||
// fetch token from response
|
||||
var response map[string]interface{}
|
||||
err = json.NewDecoder(jsonResponse.Body).Decode(&response)
|
||||
if err != nil {
|
||||
return "", errors.Wrap(err, "failed to decode oauth exchange response")
|
||||
}
|
||||
|
||||
// Parse the refresh_token from the response
|
||||
if t, found := response["refresh_token"]; found {
|
||||
if refreshToken, ok := t.(string); ok {
|
||||
return refreshToken, nil
|
||||
}
|
||||
return "", errors.New("failed to cast refresh token from acr")
|
||||
}
|
||||
return "", errors.Wrap(err, "refresh token not found in response of oauth exchange call")
|
||||
}
|
||||
|
||||
func setupACRCert(cert, certPath string) error {
|
||||
decoded, err := base64.StdEncoding.DecodeString(cert)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "failed to base64 decode ACR certificate")
|
||||
}
|
||||
err = ioutil.WriteFile(certPath, decoded, 0644)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "failed to write ACR certificate")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func getPublicUrl(token, registryUrl, subscriptionId string) (string, error) {
|
||||
if len(subscriptionId) == 0 || registryUrl == "" {
|
||||
return "", nil
|
||||
}
|
||||
|
||||
registry := strings.Split(registryUrl, ".")[0]
|
||||
filter := fmt.Sprintf("resourceType eq 'Microsoft.ContainerRegistry/registries' and name eq '%s'", registry)
|
||||
params := url.Values{}
|
||||
params.Add("$filter", filter)
|
||||
params.Add("api-version", azSubscriptionApiVersion)
|
||||
params.Add("$select", "id")
|
||||
url := azSubscriptionBaseUrl + subscriptionId + "/resources?" + params.Encode()
|
||||
|
||||
client := &http.Client{}
|
||||
req, err := http.NewRequest("GET", url, nil)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return "", errors.Wrap(err, "failed to create request for getting container registry setting")
|
||||
}
|
||||
|
||||
req.Header.Add("Authorization", "Bearer "+token)
|
||||
res, err := client.Do(req)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return "", errors.Wrap(err, "failed to send request for getting container registry setting")
|
||||
}
|
||||
defer res.Body.Close()
|
||||
|
||||
var response subscriptionUrlResponse
|
||||
err = json.NewDecoder(res.Body).Decode(&response)
|
||||
if err != nil {
|
||||
return "", errors.Wrap(err, "failed to send request for getting container registry setting")
|
||||
}
|
||||
if len(response.Value) == 0 {
|
||||
return "", errors.New("no id present for base url")
|
||||
}
|
||||
return basePublicUrl + encodeParam(response.Value[0].ID), nil
|
||||
}
|
||||
|
||||
func encodeParam(s string) string {
|
||||
return url.QueryEscape(s)
|
||||
}
|
||||
|
||||
func getenv(key ...string) (s string) {
|
||||
for _, k := range key {
|
||||
s = os.Getenv(k)
|
||||
|
||||
@@ -193,6 +193,9 @@ func (p Plugin) Exec() error {
|
||||
fmt.Println(out)
|
||||
return fmt.Errorf("Error authenticating base connector: exit status 1")
|
||||
}
|
||||
} else {
|
||||
fmt.Println("\033[33mTo ensure consistent and reliable pipeline execution, we recommend setting up a Base Image Connector.\033[0m\n" +
|
||||
"\033[33mWhile optional at this time, configuring it helps prevent failures caused by Docker Hub's rate limits.\033[0m")
|
||||
}
|
||||
|
||||
// login to the Docker registry
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM docker:20.10.14-dind
|
||||
FROM docker:28.1.1-dind
|
||||
|
||||
ENV DOCKER_HOST=unix:///var/run/docker.sock
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM arm64v8/docker:20.10.14-dind
|
||||
FROM arm64v8/docker:28.1.1-dind
|
||||
|
||||
ENV DOCKER_HOST=unix:///var/run/docker.sock
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
module github.com/drone-plugins/drone-docker
|
||||
|
||||
require (
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.17.1
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.2
|
||||
github.com/aws/aws-sdk-go v1.26.7
|
||||
github.com/coreos/go-semver v0.3.0
|
||||
github.com/dchest/uniuri v1.2.0
|
||||
@@ -8,8 +10,9 @@ require (
|
||||
github.com/drone/drone-go v1.7.1
|
||||
github.com/inhies/go-bytesize v0.0.0-20210819104631-275770b98743
|
||||
github.com/joho/godotenv v1.3.0
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/sirupsen/logrus v1.9.0
|
||||
github.com/stretchr/testify v1.8.1
|
||||
github.com/stretchr/testify v1.10.0
|
||||
github.com/urfave/cli v1.22.2
|
||||
golang.org/x/oauth2 v0.13.0
|
||||
google.golang.org/api v0.146.0
|
||||
@@ -18,22 +21,27 @@ require (
|
||||
require (
|
||||
cloud.google.com/go/compute v1.23.1 // indirect
|
||||
cloud.google.com/go/compute/metadata v0.2.3 // indirect
|
||||
github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 // indirect
|
||||
github.com/AzureAD/microsoft-authentication-library-for-go v1.3.3 // indirect
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/golang-jwt/jwt/v5 v5.2.1 // indirect
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
||||
github.com/golang/protobuf v1.5.3 // indirect
|
||||
github.com/google/s2a-go v0.1.7 // indirect
|
||||
github.com/google/uuid v1.3.1 // indirect
|
||||
github.com/google/uuid v1.6.0 // indirect
|
||||
github.com/googleapis/enterprise-certificate-proxy v0.3.1 // indirect
|
||||
github.com/googleapis/gax-go/v2 v2.12.0 // indirect
|
||||
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af // indirect
|
||||
github.com/kylelemons/godebug v1.1.0 // indirect
|
||||
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
||||
go.opencensus.io v0.24.0 // indirect
|
||||
golang.org/x/crypto v0.14.0 // indirect
|
||||
golang.org/x/net v0.17.0 // indirect
|
||||
golang.org/x/sys v0.13.0 // indirect
|
||||
golang.org/x/text v0.13.0 // indirect
|
||||
golang.org/x/crypto v0.36.0 // indirect
|
||||
golang.org/x/net v0.37.0 // indirect
|
||||
golang.org/x/sys v0.31.0 // indirect
|
||||
golang.org/x/text v0.23.0 // indirect
|
||||
google.golang.org/appengine v1.6.8 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b // indirect
|
||||
google.golang.org/grpc v1.59.0 // indirect
|
||||
@@ -42,4 +50,6 @@ require (
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
)
|
||||
|
||||
go 1.22.4
|
||||
go 1.23.0
|
||||
|
||||
toolchain go1.23.7
|
||||
|
||||
@@ -4,10 +4,24 @@ cloud.google.com/go/compute v1.23.1/go.mod h1:CqB3xpmPKKt3OJpW2ndFIXnA9A4xAy/F3X
|
||||
cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY=
|
||||
cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA=
|
||||
github.com/99designs/httpsignatures-go v0.0.0-20170731043157-88528bf4ca7e/go.mod h1:Xa6lInWHNQnuWoF0YPSsx+INFA9qk7/7pTjwb3PInkY=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.17.1 h1:DSDNVxqkoXJiko6x8a90zidoYqnYYa6c1MTzDKzKkTo=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.17.1/go.mod h1:zGqV2R4Cr/k8Uye5w+dgQ06WJtEcbQG/8J7BB6hnCr4=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.2 h1:F0gBpfdPLGsw+nsgk6aqqkZS1jiixa5WwFe3fk/T3Ys=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.2/go.mod h1:SqINnQ9lVVdRlyC8cd1lCI0SdX4n2paeABd2K8ggfnE=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.3.2 h1:yz1bePFlP5Vws5+8ez6T3HWXPmwOK7Yvq8QxDBD3SKY=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.3.2/go.mod h1:Pa9ZNPuoNu/GztvBSKk9J1cDJW6vk/n0zLtV4mgd8N8=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 h1:ywEEhmNahHBihViHepv3xPBn1663uRv2t2q/ESv9seY=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0/go.mod h1:iZDifYGJTIgIIkYRNWPENUnqx6bJ2xnSDFI2tjwZNuY=
|
||||
github.com/AzureAD/microsoft-authentication-extensions-for-go/cache v0.1.1 h1:WJTmL004Abzc5wDB5VtZG2PJk5ndYDgVacGqfirKxjM=
|
||||
github.com/AzureAD/microsoft-authentication-extensions-for-go/cache v0.1.1/go.mod h1:tCcJZ0uHAmvjsVYzEFivsRTN00oz5BEsRgQHu5JZ9WE=
|
||||
github.com/AzureAD/microsoft-authentication-library-for-go v1.3.3 h1:H5xDQaE3XowWfhZRUpnfC+rGZMEVoSiji+b+/HFAPU4=
|
||||
github.com/AzureAD/microsoft-authentication-library-for-go v1.3.3/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI=
|
||||
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/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
|
||||
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
||||
github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM=
|
||||
@@ -20,6 +34,8 @@ 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/dchest/uniuri v1.2.0 h1:koIcOUdrTIivZgSLhHQvKgqdWZq5d7KdMEWF1Ud6+5g=
|
||||
github.com/dchest/uniuri v1.2.0/go.mod h1:fSzm4SLHzNZvWLvWJew423PhAzkpNQYq+uNLq4kxhkY=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
|
||||
github.com/drone-plugins/drone-plugin-lib v0.4.1 h1:47rZlmcMpr1hSp+6Gl+1Z4t+efi/gMQU3lxukC1Yg64=
|
||||
github.com/drone-plugins/drone-plugin-lib v0.4.1/go.mod h1:KwCu92jFjHV3xv2hu5Qg/8zBNvGwbhoJDQw/EwnTvoM=
|
||||
github.com/drone/drone-go v1.7.1 h1:ZX+3Rs8YHUSUQ5mkuMLmm1zr1ttiiE2YGNxF3AnyDKw=
|
||||
@@ -28,6 +44,8 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF
|
||||
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk=
|
||||
github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=
|
||||
@@ -58,8 +76,8 @@ github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN
|
||||
github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o=
|
||||
github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw=
|
||||
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4=
|
||||
github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/googleapis/enterprise-certificate-proxy v0.3.1 h1:SBWmZhjUDRorQxrN0nwzf+AHBxnbFjViHQS4P0yVpmQ=
|
||||
github.com/googleapis/enterprise-certificate-proxy v0.3.1/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0=
|
||||
github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas=
|
||||
@@ -70,9 +88,25 @@ github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5i
|
||||
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
|
||||
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/keybase/go-keychain v0.0.0-20231219164618-57a3676c3af6 h1:IsMZxCuZqKuao2vNdfD82fjjgPLfyHLpR41Z88viRWs=
|
||||
github.com/keybase/go-keychain v0.0.0-20231219164618-57a3676c3af6/go.mod h1:3VeWNIJaW+O5xpRQbPp0Ybqu1vJd/pm7s2F473HRrkw=
|
||||
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
||||
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
|
||||
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
|
||||
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ=
|
||||
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
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/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/redis/go-redis/v9 v9.7.0 h1:HhLSs+B6O021gwzl+locl0zEDnyNkxMtf/Z3NNBMa9E=
|
||||
github.com/redis/go-redis/v9 v9.7.0/go.mod h1:f6zhXITC7JUJIlPEiBOTXxJgPLdZcA93GewI7inzyWw=
|
||||
github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
|
||||
github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
|
||||
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
|
||||
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
@@ -85,8 +119,9 @@ github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpE
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
|
||||
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
|
||||
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||
github.com/urfave/cli v1.22.2 h1:gsqYFH8bb9ekPA12kRo0hfjngWQjkJPlN9R0N78BoUo=
|
||||
github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
|
||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
@@ -95,8 +130,8 @@ go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc=
|
||||
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
|
||||
golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34=
|
||||
golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
||||
@@ -111,8 +146,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL
|
||||
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
|
||||
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
|
||||
golang.org/x/net v0.37.0 h1:1zLorHbz+LYj7MQlSf1+2tPIIgibq2eL5xkrGk6f+2c=
|
||||
golang.org/x/net v0.37.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY=
|
||||
golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0=
|
||||
@@ -120,8 +155,8 @@ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJ
|
||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E=
|
||||
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
|
||||
golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw=
|
||||
golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
|
||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/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=
|
||||
@@ -131,16 +166,17 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc
|
||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
|
||||
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik=
|
||||
golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
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/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
|
||||
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
|
||||
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||
golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
|
||||
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
||||
@@ -185,8 +221,9 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
|
||||
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||
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=
|
||||
|
||||
Reference in New Issue
Block a user