mirror of
https://github.com/drone-plugins/drone-docker.git
synced 2026-06-16 14:50:37 +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
|
||||
|
||||
@@ -10,6 +10,7 @@ import (
|
||||
"net/url"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
|
||||
@@ -28,7 +29,7 @@ type subscriptionUrlResponse struct {
|
||||
}
|
||||
|
||||
const (
|
||||
acrCertPath = "/tmp/acr-cert.pem"
|
||||
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/"
|
||||
@@ -41,6 +42,10 @@ const (
|
||||
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 != "" {
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user