Compare commits

..

31 Commits

Author SHA1 Message Date
TP Honey 6ec5e71411 Merge pull request #338 from tphoney/bump-go-1.13
(maint) bump git to 1.13 for build and test
2021-10-13 17:19:30 +01:00
TP Honey 0911e6a922 (maint) bump git to 1.13 for build and test 2021-10-13 14:53:32 +01:00
TP Honey 88f8bf1cb0 Merge pull request #337 from tphoney/prep_v19.03.9
(maint) v19.03.9 release prep
2021-10-13 14:32:03 +01:00
TP Honey 2d70a1fa7c (maint) v19.03.9 release prep 2021-10-13 14:27:33 +01:00
Eoin McAfee 607b04a871 Merge pull request #333 from jimsheldon/ecr-externalid
adding support for externalId
2021-09-23 15:52:24 +01:00
Jim Sheldon e44c2d46ea adding support for externalId 2021-09-17 15:33:05 -04:00
Brad Rydzewski 72ef7b1f3f log available credentials before login 2021-08-02 22:15:39 -04:00
Brad Rydzewski fbbeec5a2e use Replace instead of ReplaceAll 2021-08-02 21:42:22 -04:00
Brad Rydzewski b1d8698d1c print login failure reason to output 2021-08-02 21:28:37 -04:00
Brad Rydzewski d4cf9f20f1 remove pull always 2021-07-11 15:50:43 -04:00
Brad Rydzewski f75380013d Merge pull request #325 from drone-plugins/revert-322-update-seccomp
Revert "Update seccomp to 20.10 docker"
2021-07-11 15:39:35 -04:00
Brad Rydzewski c10d36754c Revert "Update seccomp to 20.10 docker (#322)"
This reverts commit dd359dfc72.
2021-07-11 15:38:04 -04:00
techknowlogick dd359dfc72 Update seccomp to 20.10 docker (#322)
* Update seccomp to 20.10 docker
2021-07-07 20:03:54 +01:00
TP Honey 729aa5d300 Merge pull request #323 from tphoney/docker_rate_limit
(maint) CI, remove the dry run steps, due to rate limiting
2021-07-07 19:52:19 +01:00
TP Honey db5c2161fe (maint) CI, remove the dry run steps, due to rate limiting 2021-07-07 19:37:30 +01:00
Brad Rydzewski f08821b024 Merge pull request #300 from rvoitenko/ecr_scan_on_push
ECR: adding setting to enable image scanning while repo creation
2021-04-06 15:55:56 -04:00
Brad Rydzewski 0f6bd8a62e Merge pull request #313 from codrut-fc/opencontainer-labels
Add support for automatic opencontainer labels
2021-03-01 20:52:08 -05:00
Roman Voitenko 5760e7b4e8 Merge branch 'master' into ecr_scan_on_push 2021-02-20 13:32:16 +01:00
Brad Rydzewski 7ade37a140 Update .drone.yml 2021-02-16 09:44:28 -05:00
Brad Rydzewski 319660d758 Merge pull request #312 from xoxys/master
add custom seccomp profile
2021-02-09 16:29:27 -05:00
Codruț Constantin Gușoi bd4029884c Add support for automatic opencontainer labels 2021-01-20 18:14:27 +00:00
Robert Kaussow b1959299c7 load the patched seccomp profile only on arm 2021-01-17 18:40:36 +01:00
Robert Kaussow bfdf3034c1 add custom seccomp profile 2021-01-17 14:27:49 +01:00
Brad Rydzewski 9c86f98ea5 Update main.go 2020-11-25 11:51:03 -05:00
Brad Rydzewski faec3cf9d8 temporarily revert to last working yaml [CI SKIP] 2020-11-19 17:12:28 -05:00
Don ad1fa9495f Merge pull request #303 from drone-plugins/fix-windows-build
Fix Windows build
2020-11-09 16:44:15 -08:00
Don 799cc8e35e Fix Windows build
The Windows docker builds should only be triggered when there's a push to master or
a tag. Also add proper tagging to the Windows builds.
2020-10-16 07:26:12 -07:00
Brad Rydzewski 5834d8dff9 Merge pull request #304 from tonglil/typos [CI SKIP]
minor typo
2020-10-16 10:10:19 -04:00
Tony Li 4abe7c9d20 minor typo 2020-10-15 15:41:26 -07:00
Roman Voitenko 3501d9a65d add possibility to turn on/off image scanning not only during repo creation, but when repo already created 2020-10-01 10:43:25 +02:00
Roman Voitenko d8b6b48fa3 add possibility to turn on ECR image scanning for repos created by ecr plugin 2020-09-30 23:32:23 +02:00
29 changed files with 301 additions and 634 deletions
+68 -418
View File
@@ -8,8 +8,7 @@ platform:
steps: steps:
- name: vet - name: vet
pull: always image: golang:1.13
image: golang:1.11
commands: commands:
- go vet ./... - go vet ./...
environment: environment:
@@ -19,8 +18,7 @@ steps:
path: /go path: /go
- name: test - name: test
pull: always image: golang:1.13
image: golang:1.11
commands: commands:
- go test -cover ./... - go test -cover ./...
environment: environment:
@@ -77,43 +75,43 @@ trigger:
depends_on: depends_on:
- testing - testing
--- # ---
kind: pipeline # kind: pipeline
type: ssh # type: ssh
name: windows-1903-amd64-docker # name: windows-1903-amd64-docker
platform: # platform:
os: windows # os: windows
server: # server:
host: windows.1903.amd64.plugins.drone.ci # host: windows.1903.amd64.plugins.drone.ci
password: # password:
from_secret: windows_password # from_secret: windows_password
user: # user:
from_secret: windows_username # from_secret: windows_username
steps: # steps:
- name: build # - name: build
commands: # commands:
# TODO use the new DRONE_SEMVER_SHORT environment variables to # # TODO use the new DRONE_SEMVER_SHORT environment variables to
# publish docker images for tag events. # # publish docker images for tag events.
- go build -o release/windows/amd64/drone-docker.exe ./cmd/drone-docker # - go build -o release/windows/amd64/drone-docker.exe ./cmd/drone-docker
- docker login -u $env:USERNAME -p $env:PASSWORD # - docker login -u $env:USERNAME -p $env:PASSWORD
- docker build -f docker/docker/Dockerfile.windows.1903 -t plugins/docker:windows-1903-amd64 . # - docker build -f docker/docker/Dockerfile.windows.1903 -t plugins/docker:windows-1903-amd64 .
- docker push plugins/docker:windows-1903-amd64 # - docker push plugins/docker:windows-1903-amd64
environment: # environment:
CGO_ENABLED: "0" # CGO_ENABLED: "0"
USERNAME: # USERNAME:
from_secret: docker_username # from_secret: docker_username
PASSWORD: # PASSWORD:
from_secret: docker_password # from_secret: docker_password
trigger: # trigger:
event: # event:
- push # - push
depends_on: # depends_on:
- testing # - testing
--- ---
kind: pipeline kind: pipeline
@@ -163,8 +161,7 @@ platform:
steps: steps:
- name: build-push - name: build-push
pull: always image: golang:1.13
image: golang:1.11
commands: 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" - "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: environment:
@@ -176,8 +173,7 @@ steps:
- tag - tag
- name: build-tag - name: build-tag
pull: always image: golang:1.13
image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/amd64/drone-docker ./cmd/drone-docker" - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/amd64/drone-docker ./cmd/drone-docker"
environment: environment:
@@ -188,30 +184,11 @@ steps:
- tag - tag
- name: executable - name: executable
pull: always image: golang:1.13
image: golang:1.11
commands: commands:
- ./release/linux/amd64/drone-docker --help - ./release/linux/amd64/drone-docker --help
- name: dryrun
pull: always
image: plugins/docker:18
settings:
daemon_off: false
dockerfile: docker/docker/Dockerfile.linux.amd64
dry_run: true
password:
from_secret: docker_password
repo: plugins/docker
tags: linux-amd64
username:
from_secret: docker_username
when:
event:
- pull_request
- name: publish - name: publish
pull: always
image: plugins/docker:18 image: plugins/docker:18
settings: settings:
auto_tag: true auto_tag: true
@@ -247,8 +224,7 @@ platform:
steps: steps:
- name: build-push - name: build-push
pull: always image: golang:1.13
image: golang:1.11
commands: 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" - "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: environment:
@@ -260,8 +236,7 @@ steps:
- tag - tag
- name: build-tag - name: build-tag
pull: always image: golang:1.13
image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm64/drone-docker ./cmd/drone-docker" - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm64/drone-docker ./cmd/drone-docker"
environment: environment:
@@ -272,30 +247,11 @@ steps:
- tag - tag
- name: executable - name: executable
pull: always image: golang:1.13
image: golang:1.11
commands: commands:
- ./release/linux/arm64/drone-docker --help - ./release/linux/arm64/drone-docker --help
- name: dryrun
pull: always
image: plugins/docker:18
settings:
daemon_off: false
dockerfile: docker/docker/Dockerfile.linux.arm64
dry_run: true
password:
from_secret: docker_password
repo: plugins/docker
tags: linux-arm64
username:
from_secret: docker_username
when:
event:
- pull_request
- name: publish - name: publish
pull: always
image: plugins/docker:18 image: plugins/docker:18
settings: settings:
auto_tag: true auto_tag: true
@@ -331,8 +287,7 @@ platform:
steps: steps:
- name: build-push - name: build-push
pull: always image: golang:1.13
image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/arm/drone-docker ./cmd/drone-docker" - "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/arm/drone-docker ./cmd/drone-docker"
environment: environment:
@@ -344,8 +299,7 @@ steps:
- tag - tag
- name: build-tag - name: build-tag
pull: always image: golang:1.13
image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm/drone-docker ./cmd/drone-docker" - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm/drone-docker ./cmd/drone-docker"
environment: environment:
@@ -356,30 +310,11 @@ steps:
- tag - tag
- name: executable - name: executable
pull: always image: golang:1.13
image: golang:1.11
commands: commands:
- ./release/linux/arm/drone-docker --help - ./release/linux/arm/drone-docker --help
- name: dryrun
pull: always
image: plugins/docker:18
settings:
daemon_off: false
dockerfile: docker/docker/Dockerfile.linux.arm
dry_run: true
password:
from_secret: docker_password
repo: plugins/docker
tags: linux-arm
username:
from_secret: docker_username
when:
event:
- pull_request
- name: publish - name: publish
pull: always
image: plugins/docker:18 image: plugins/docker:18
settings: settings:
auto_tag: true auto_tag: true
@@ -415,7 +350,6 @@ platform:
steps: steps:
- name: manifest - name: manifest
pull: always
image: plugins/manifest image: plugins/manifest
settings: settings:
auto_tag: true auto_tag: true
@@ -426,14 +360,6 @@ steps:
username: username:
from_secret: docker_username from_secret: docker_username
- name: microbadger
pull: always
image: plugins/webhook
failure: ignore
settings:
urls:
from_secret: microbadger_docker
trigger: trigger:
ref: ref:
- refs/heads/master - refs/heads/master
@@ -441,11 +367,11 @@ trigger:
depends_on: depends_on:
- windows-1809-amd64-docker - windows-1809-amd64-docker
- windows-1903-amd64-docker
- windows-1909-amd64-docker - windows-1909-amd64-docker
- linux-amd64-docker - linux-amd64-docker
- linux-arm64-docker - linux-arm64-docker
- linux-arm-docker - linux-arm-docker
# - windows-1903-amd64-dfocker
--- ---
kind: pipeline kind: pipeline
@@ -457,8 +383,7 @@ platform:
steps: steps:
- name: build-push - name: build-push
pull: always image: golang:1.13
image: golang:1.11
commands: 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" - "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: environment:
@@ -470,8 +395,7 @@ steps:
- tag - tag
- name: build-tag - name: build-tag
pull: always image: golang:1.13
image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/amd64/drone-gcr ./cmd/drone-gcr" - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/amd64/drone-gcr ./cmd/drone-gcr"
environment: environment:
@@ -481,25 +405,7 @@ steps:
event: event:
- tag - tag
- name: dryrun
pull: always
image: plugins/docker:18
settings:
daemon_off: false
dockerfile: docker/gcr/Dockerfile.linux.amd64
dry_run: true
password:
from_secret: docker_password
repo: plugins/gcr
tags: linux-amd64
username:
from_secret: docker_username
when:
event:
- pull_request
- name: publish - name: publish
pull: always
image: plugins/docker:18 image: plugins/docker:18
settings: settings:
auto_tag: true auto_tag: true
@@ -535,8 +441,7 @@ platform:
steps: steps:
- name: build-push - name: build-push
pull: always image: golang:1.13
image: golang:1.11
commands: 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" - "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: environment:
@@ -548,8 +453,7 @@ steps:
- tag - tag
- name: build-tag - name: build-tag
pull: always image: golang:1.13
image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm64/drone-gcr ./cmd/drone-gcr" - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm64/drone-gcr ./cmd/drone-gcr"
environment: environment:
@@ -559,25 +463,7 @@ steps:
event: event:
- tag - tag
- name: dryrun
pull: always
image: plugins/docker:18
settings:
daemon_off: false
dockerfile: docker/gcr/Dockerfile.linux.arm64
dry_run: true
password:
from_secret: docker_password
repo: plugins/gcr
tags: linux-arm64
username:
from_secret: docker_username
when:
event:
- pull_request
- name: publish - name: publish
pull: always
image: plugins/docker:18 image: plugins/docker:18
settings: settings:
auto_tag: true auto_tag: true
@@ -613,8 +499,7 @@ platform:
steps: steps:
- name: build-push - name: build-push
pull: always image: golang:1.13
image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/arm/drone-gcr ./cmd/drone-gcr" - "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/arm/drone-gcr ./cmd/drone-gcr"
environment: environment:
@@ -626,8 +511,7 @@ steps:
- tag - tag
- name: build-tag - name: build-tag
pull: always image: golang:1.13
image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm/drone-gcr ./cmd/drone-gcr" - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm/drone-gcr ./cmd/drone-gcr"
environment: environment:
@@ -637,25 +521,7 @@ steps:
event: event:
- tag - tag
- name: dryrun
pull: always
image: plugins/docker:18
settings:
daemon_off: false
dockerfile: docker/gcr/Dockerfile.linux.arm
dry_run: true
password:
from_secret: docker_password
repo: plugins/gcr
tags: linux-arm
username:
from_secret: docker_username
when:
event:
- pull_request
- name: publish - name: publish
pull: always
image: plugins/docker:18 image: plugins/docker:18
settings: settings:
auto_tag: true auto_tag: true
@@ -691,7 +557,6 @@ platform:
steps: steps:
- name: manifest - name: manifest
pull: always
image: plugins/manifest image: plugins/manifest
settings: settings:
auto_tag: true auto_tag: true
@@ -702,14 +567,6 @@ steps:
username: username:
from_secret: docker_username from_secret: docker_username
- name: microbadger
pull: always
image: plugins/webhook
failure: ignore
settings:
urls:
from_secret: microbadger_gcr
trigger: trigger:
ref: ref:
- refs/heads/master - refs/heads/master
@@ -730,8 +587,7 @@ platform:
steps: steps:
- name: build-push - name: build-push
pull: always image: golang:1.13
image: golang:1.11
commands: 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" - "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: environment:
@@ -743,8 +599,7 @@ steps:
- tag - tag
- name: build-tag - name: build-tag
pull: always image: golang:1.13
image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/amd64/drone-ecr ./cmd/drone-ecr" - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/amd64/drone-ecr ./cmd/drone-ecr"
environment: environment:
@@ -754,25 +609,7 @@ steps:
event: event:
- tag - tag
- name: dryrun
pull: always
image: plugins/docker:18
settings:
daemon_off: false
dockerfile: docker/ecr/Dockerfile.linux.amd64
dry_run: true
password:
from_secret: docker_password
repo: plugins/ecr
tags: linux-amd64
username:
from_secret: docker_username
when:
event:
- pull_request
- name: publish - name: publish
pull: always
image: plugins/docker:18 image: plugins/docker:18
settings: settings:
auto_tag: true auto_tag: true
@@ -808,8 +645,7 @@ platform:
steps: steps:
- name: build-push - name: build-push
pull: always image: golang:1.13
image: golang:1.11
commands: 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" - "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: environment:
@@ -821,8 +657,7 @@ steps:
- tag - tag
- name: build-tag - name: build-tag
pull: always image: golang:1.13
image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm64/drone-ecr ./cmd/drone-ecr" - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm64/drone-ecr ./cmd/drone-ecr"
environment: environment:
@@ -832,25 +667,7 @@ steps:
event: event:
- tag - tag
- name: dryrun
pull: always
image: plugins/docker:18
settings:
daemon_off: false
dockerfile: docker/ecr/Dockerfile.linux.arm64
dry_run: true
password:
from_secret: docker_password
repo: plugins/ecr
tags: linux-arm64
username:
from_secret: docker_username
when:
event:
- pull_request
- name: publish - name: publish
pull: always
image: plugins/docker:18 image: plugins/docker:18
settings: settings:
auto_tag: true auto_tag: true
@@ -886,8 +703,7 @@ platform:
steps: steps:
- name: build-push - name: build-push
pull: always image: golang:1.13
image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/arm/drone-ecr ./cmd/drone-ecr" - "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/arm/drone-ecr ./cmd/drone-ecr"
environment: environment:
@@ -899,8 +715,7 @@ steps:
- tag - tag
- name: build-tag - name: build-tag
pull: always image: golang:1.13
image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm/drone-ecr ./cmd/drone-ecr" - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm/drone-ecr ./cmd/drone-ecr"
environment: environment:
@@ -910,25 +725,7 @@ steps:
event: event:
- tag - tag
- name: dryrun
pull: always
image: plugins/docker:18
settings:
daemon_off: false
dockerfile: docker/ecr/Dockerfile.linux.arm
dry_run: true
password:
from_secret: docker_password
repo: plugins/ecr
tags: linux-arm
username:
from_secret: docker_username
when:
event:
- pull_request
- name: publish - name: publish
pull: always
image: plugins/docker:18 image: plugins/docker:18
settings: settings:
auto_tag: true auto_tag: true
@@ -964,7 +761,6 @@ platform:
steps: steps:
- name: manifest - name: manifest
pull: always
image: plugins/manifest image: plugins/manifest
settings: settings:
auto_tag: true auto_tag: true
@@ -975,14 +771,6 @@ steps:
username: username:
from_secret: docker_username from_secret: docker_username
- name: microbadger
pull: always
image: plugins/webhook
failure: ignore
settings:
urls:
from_secret: microbadger_ecr
trigger: trigger:
ref: ref:
- refs/heads/master - refs/heads/master
@@ -1003,8 +791,7 @@ platform:
steps: steps:
- name: build-push - name: build-push
pull: always image: golang:1.13
image: golang:1.11
commands: 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" - "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: environment:
@@ -1016,8 +803,7 @@ steps:
- tag - tag
- name: build-tag - name: build-tag
pull: always image: golang:1.13
image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/amd64/drone-heroku ./cmd/drone-heroku" - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/amd64/drone-heroku ./cmd/drone-heroku"
environment: environment:
@@ -1027,25 +813,7 @@ steps:
event: event:
- tag - tag
- name: dryrun
pull: always
image: plugins/docker:18
settings:
daemon_off: false
dockerfile: docker/heroku/Dockerfile.linux.amd64
dry_run: true
password:
from_secret: docker_password
repo: plugins/heroku
tags: linux-amd64
username:
from_secret: docker_username
when:
event:
- pull_request
- name: publish - name: publish
pull: always
image: plugins/docker:18 image: plugins/docker:18
settings: settings:
auto_tag: true auto_tag: true
@@ -1081,8 +849,7 @@ platform:
steps: steps:
- name: build-push - name: build-push
pull: always image: golang:1.13
image: golang:1.11
commands: 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" - "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: environment:
@@ -1094,8 +861,7 @@ steps:
- tag - tag
- name: build-tag - name: build-tag
pull: always image: golang:1.13
image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm64/drone-heroku ./cmd/drone-heroku" - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm64/drone-heroku ./cmd/drone-heroku"
environment: environment:
@@ -1105,25 +871,7 @@ steps:
event: event:
- tag - tag
- name: dryrun
pull: always
image: plugins/docker:18
settings:
daemon_off: false
dockerfile: docker/heroku/Dockerfile.linux.arm64
dry_run: true
password:
from_secret: docker_password
repo: plugins/heroku
tags: linux-arm64
username:
from_secret: docker_username
when:
event:
- pull_request
- name: publish - name: publish
pull: always
image: plugins/docker:18 image: plugins/docker:18
settings: settings:
auto_tag: true auto_tag: true
@@ -1159,8 +907,7 @@ platform:
steps: steps:
- name: build-push - name: build-push
pull: always image: golang:1.13
image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/arm/drone-heroku ./cmd/drone-heroku" - "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/arm/drone-heroku ./cmd/drone-heroku"
environment: environment:
@@ -1172,8 +919,7 @@ steps:
- tag - tag
- name: build-tag - name: build-tag
pull: always image: golang:1.13
image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm/drone-heroku ./cmd/drone-heroku" - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm/drone-heroku ./cmd/drone-heroku"
environment: environment:
@@ -1183,25 +929,7 @@ steps:
event: event:
- tag - tag
- name: dryrun
pull: always
image: plugins/docker:18
settings:
daemon_off: false
dockerfile: docker/heroku/Dockerfile.linux.arm
dry_run: true
password:
from_secret: docker_password
repo: plugins/heroku
tags: linux-arm
username:
from_secret: docker_username
when:
event:
- pull_request
- name: publish - name: publish
pull: always
image: plugins/docker:18 image: plugins/docker:18
settings: settings:
auto_tag: true auto_tag: true
@@ -1237,7 +965,6 @@ platform:
steps: steps:
- name: manifest - name: manifest
pull: always
image: plugins/manifest image: plugins/manifest
settings: settings:
auto_tag: true auto_tag: true
@@ -1248,14 +975,6 @@ steps:
username: username:
from_secret: docker_username from_secret: docker_username
- name: microbadger
pull: always
image: plugins/webhook
failure: ignore
settings:
urls:
from_secret: microbadger_heroku
trigger: trigger:
ref: ref:
- refs/heads/master - refs/heads/master
@@ -1276,8 +995,7 @@ platform:
steps: steps:
- name: build-push - name: build-push
pull: always image: golang:1.13
image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/amd64/drone-acr ./cmd/drone-acr" - "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/amd64/drone-acr ./cmd/drone-acr"
environment: environment:
@@ -1289,8 +1007,7 @@ steps:
- tag - tag
- name: build-tag - name: build-tag
pull: always image: golang:1.13
image: golang:1.11
commands: 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" - "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: environment:
@@ -1300,25 +1017,7 @@ steps:
event: event:
- tag - tag
- name: dryrun
pull: always
image: plugins/docker:18
settings:
daemon_off: false
dockerfile: docker/acr/Dockerfile.linux.amd64
dry_run: true
password:
from_secret: docker_password
repo: plugins/acr
tags: linux-amd64
username:
from_secret: docker_username
when:
event:
- pull_request
- name: publish - name: publish
pull: always
image: plugins/docker:18 image: plugins/docker:18
settings: settings:
auto_tag: true auto_tag: true
@@ -1354,8 +1053,7 @@ platform:
steps: steps:
- name: build-push - name: build-push
pull: always image: golang:1.13
image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/arm64/drone-acr ./cmd/drone-acr" - "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/arm64/drone-acr ./cmd/drone-acr"
environment: environment:
@@ -1367,8 +1065,7 @@ steps:
- tag - tag
- name: build-tag - name: build-tag
pull: always image: golang:1.13
image: golang:1.11
commands: 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" - "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: environment:
@@ -1378,25 +1075,7 @@ steps:
event: event:
- tag - tag
- name: dryrun
pull: always
image: plugins/docker:18
settings:
daemon_off: false
dockerfile: docker/acr/Dockerfile.linux.arm64
dry_run: true
password:
from_secret: docker_password
repo: plugins/acr
tags: linux-arm64
username:
from_secret: docker_username
when:
event:
- pull_request
- name: publish - name: publish
pull: always
image: plugins/docker:18 image: plugins/docker:18
settings: settings:
auto_tag: true auto_tag: true
@@ -1432,8 +1111,7 @@ platform:
steps: steps:
- name: build-push - name: build-push
pull: always image: golang:1.13
image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/arm/drone-acr ./cmd/drone-acr" - "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/arm/drone-acr ./cmd/drone-acr"
environment: environment:
@@ -1445,8 +1123,7 @@ steps:
- tag - tag
- name: build-tag - name: build-tag
pull: always image: golang:1.13
image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/arm/drone-acr ./cmd/drone-acr" - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/arm/drone-acr ./cmd/drone-acr"
environment: environment:
@@ -1456,25 +1133,7 @@ steps:
event: event:
- tag - tag
- name: dryrun
pull: always
image: plugins/docker:18
settings:
daemon_off: false
dockerfile: docker/acr/Dockerfile.linux.arm
dry_run: true
password:
from_secret: docker_password
repo: plugins/acr
tags: linux-arm
username:
from_secret: docker_username
when:
event:
- pull_request
- name: publish - name: publish
pull: always
image: plugins/docker:18 image: plugins/docker:18
settings: settings:
auto_tag: true auto_tag: true
@@ -1510,7 +1169,6 @@ platform:
steps: steps:
- name: manifest - name: manifest
pull: always
image: plugins/manifest image: plugins/manifest
settings: settings:
ignore_missing: true ignore_missing: true
@@ -1520,14 +1178,6 @@ steps:
username: username:
from_secret: docker_username from_secret: docker_username
- name: microbadger
pull: always
image: plugins/webhook
failure: ignore
settings:
url:
from_secret: microbadger_acr
trigger: trigger:
ref: ref:
- refs/heads/master - refs/heads/master
+2
View File
@@ -0,0 +1,2 @@
since-tag=v19.03.8
+25
View File
@@ -0,0 +1,25 @@
# Changelog
## [v19.03.9](https://github.com/drone-plugins/drone-docker/tree/v19.03.9) (2021-10-13)
[Full Changelog](https://github.com/drone-plugins/drone-docker/compare/v19.03.8...v19.03.9)
**Implemented enhancements:**
- adding support for externalId [\#333](https://github.com/drone-plugins/drone-docker/pull/333) ([jimsheldon](https://github.com/jimsheldon))
- Add support for automatic opencontainer labels [\#313](https://github.com/drone-plugins/drone-docker/pull/313) ([codrut-fc](https://github.com/codrut-fc))
- add custom seccomp profile [\#312](https://github.com/drone-plugins/drone-docker/pull/312) ([xoxys](https://github.com/xoxys))
- ECR: adding setting to enable image scanning while repo creation [\#300](https://github.com/drone-plugins/drone-docker/pull/300) ([rvoitenko](https://github.com/rvoitenko))
**Fixed bugs:**
- Revert "Update seccomp to 20.10 docker" [\#325](https://github.com/drone-plugins/drone-docker/pull/325) ([bradrydzewski](https://github.com/bradrydzewski))
**Merged pull requests:**
- \(maint\) CI, remove the dry run steps, due to rate limiting [\#323](https://github.com/drone-plugins/drone-docker/pull/323) ([tphoney](https://github.com/tphoney))
- Update seccomp to 20.10 docker [\#322](https://github.com/drone-plugins/drone-docker/pull/322) ([techknowlogick](https://github.com/techknowlogick))
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
+32 -20
View File
@@ -50,7 +50,7 @@ func main() {
cli.StringFlag{ cli.StringFlag{
Name: "daemon.mirror", Name: "daemon.mirror",
Usage: "docker daemon registry mirror", Usage: "docker daemon registry mirror",
EnvVar: "PLUGIN_MIRROR", EnvVar: "PLUGIN_MIRROR,DOCKER_PLUGIN_MIRROR",
}, },
cli.StringFlag{ cli.StringFlag{
Name: "daemon.storage-driver", Name: "daemon.storage-driver",
@@ -192,6 +192,16 @@ func main() {
Usage: "label-schema labels", Usage: "label-schema labels",
EnvVar: "PLUGIN_LABEL_SCHEMA", EnvVar: "PLUGIN_LABEL_SCHEMA",
}, },
cli.BoolTFlag{
Name: "auto-label",
Usage: "auto-label true|false",
EnvVar: "PLUGIN_AUTO_LABEL",
},
cli.StringFlag{
Name: "link",
Usage: "link https://example.com/org/repo-name",
EnvVar: "PLUGIN_REPO_LINK,DRONE_REPO_LINK",
},
cli.StringFlag{ cli.StringFlag{
Name: "docker.registry", Name: "docker.registry",
Usage: "docker registry", Usage: "docker registry",
@@ -216,7 +226,7 @@ func main() {
cli.StringFlag{ cli.StringFlag{
Name: "docker.config", Name: "docker.config",
Usage: "docker json dockerconfig content", Usage: "docker json dockerconfig content",
EnvVar: "PLUGIN_CONFIG", EnvVar: "PLUGIN_CONFIG,DOCKER_PLUGIN_CONFIG",
}, },
cli.BoolTFlag{ cli.BoolTFlag{
Name: "docker.purge", Name: "docker.purge",
@@ -257,24 +267,26 @@ func run(c *cli.Context) error {
Config: c.String("docker.config"), Config: c.String("docker.config"),
}, },
Build: docker.Build{ Build: docker.Build{
Remote: c.String("remote.url"), Remote: c.String("remote.url"),
Name: c.String("commit.sha"), Name: c.String("commit.sha"),
Dockerfile: c.String("dockerfile"), Dockerfile: c.String("dockerfile"),
Context: c.String("context"), Context: c.String("context"),
Tags: c.StringSlice("tags"), Tags: c.StringSlice("tags"),
Args: c.StringSlice("args"), Args: c.StringSlice("args"),
ArgsEnv: c.StringSlice("args-from-env"), ArgsEnv: c.StringSlice("args-from-env"),
Target: c.String("target"), Target: c.String("target"),
Squash: c.Bool("squash"), Squash: c.Bool("squash"),
Pull: c.BoolT("pull-image"), Pull: c.BoolT("pull-image"),
CacheFrom: c.StringSlice("cache-from"), CacheFrom: c.StringSlice("cache-from"),
Compress: c.Bool("compress"), Compress: c.Bool("compress"),
Repo: c.String("repo"), Repo: c.String("repo"),
Labels: c.StringSlice("custom-labels"), Labels: c.StringSlice("custom-labels"),
LabelSchema: c.StringSlice("label-schema"), LabelSchema: c.StringSlice("label-schema"),
NoCache: c.Bool("no-cache"), AutoLabel: c.BoolT("auto-label"),
AddHost: c.StringSlice("add-host"), Link: c.String("link"),
Quiet: c.Bool("quiet"), NoCache: c.Bool("no-cache"),
AddHost: c.StringSlice("add-host"),
Quiet: c.Bool("quiet"),
}, },
Daemon: docker.Daemon{ Daemon: docker.Daemon{
Registry: c.String("docker.registry"), Registry: c.String("docker.registry"),
+31 -7
View File
@@ -37,6 +37,8 @@ func main() {
lifecyclePolicy = getenv("PLUGIN_LIFECYCLE_POLICY") lifecyclePolicy = getenv("PLUGIN_LIFECYCLE_POLICY")
repositoryPolicy = getenv("PLUGIN_REPOSITORY_POLICY") repositoryPolicy = getenv("PLUGIN_REPOSITORY_POLICY")
assumeRole = getenv("PLUGIN_ASSUME_ROLE") assumeRole = getenv("PLUGIN_ASSUME_ROLE")
externalId = getenv("PLUGIN_EXTERNAL_ID")
scanOnPush = parseBoolOrDefault(false, getenv("PLUGIN_SCAN_ON_PUSH"))
) )
// set the region // set the region
@@ -56,7 +58,7 @@ func main() {
log.Fatal(fmt.Sprintf("error creating aws session: %v", err)) log.Fatal(fmt.Sprintf("error creating aws session: %v", err))
} }
svc := getECRClient(sess, assumeRole) svc := getECRClient(sess, assumeRole, externalId)
username, password, defaultRegistry, err := getAuthInfo(svc) username, password, defaultRegistry, err := getAuthInfo(svc)
if registry == "" { if registry == "" {
@@ -72,10 +74,14 @@ func main() {
} }
if create { if create {
err = ensureRepoExists(svc, trimHostname(repo, registry)) err = ensureRepoExists(svc, trimHostname(repo, registry), scanOnPush)
if err != nil { if err != nil {
log.Fatal(fmt.Sprintf("error creating ECR repo: %v", err)) log.Fatal(fmt.Sprintf("error creating ECR repo: %v", err))
} }
err = updateImageScannningConfig(svc, trimHostname(repo, registry), scanOnPush)
if err != nil {
log.Fatal(fmt.Sprintf("error updating scan on push for ECR repo: %v", err))
}
} }
if lifecyclePolicy != "" { if lifecyclePolicy != "" {
@@ -118,9 +124,10 @@ func trimHostname(repo, registry string) string {
return repo return repo
} }
func ensureRepoExists(svc *ecr.ECR, name string) (err error) { func ensureRepoExists(svc *ecr.ECR, name string, scanOnPush bool) (err error) {
input := &ecr.CreateRepositoryInput{} input := &ecr.CreateRepositoryInput{}
input.SetRepositoryName(name) input.SetRepositoryName(name)
input.SetImageScanningConfiguration(&ecr.ImageScanningConfiguration{ScanOnPush: &scanOnPush})
_, err = svc.CreateRepository(input) _, err = svc.CreateRepository(input)
if err != nil { if err != nil {
if aerr, ok := err.(awserr.Error); ok && aerr.Code() == ecr.ErrCodeRepositoryAlreadyExistsException { if aerr, ok := err.(awserr.Error); ok && aerr.Code() == ecr.ErrCodeRepositoryAlreadyExistsException {
@@ -132,6 +139,15 @@ func ensureRepoExists(svc *ecr.ECR, name string) (err error) {
return return
} }
func updateImageScannningConfig(svc *ecr.ECR, name string, scanOnPush bool) (err error) {
input := &ecr.PutImageScanningConfigurationInput{}
input.SetRepositoryName(name)
input.SetImageScanningConfiguration(&ecr.ImageScanningConfiguration{ScanOnPush: &scanOnPush})
_, err = svc.PutImageScanningConfiguration(input)
return err
}
func uploadLifeCyclePolicy(svc *ecr.ECR, lifecyclePolicy string, name string) (err error) { func uploadLifeCyclePolicy(svc *ecr.ECR, lifecyclePolicy string, name string) (err error) {
input := &ecr.PutLifecyclePolicyInput{} input := &ecr.PutLifecyclePolicyInput{}
input.SetLifecyclePolicyText(lifecyclePolicy) input.SetLifecyclePolicyText(lifecyclePolicy)
@@ -193,11 +209,19 @@ func getenv(key ...string) (s string) {
return return
} }
func getECRClient(sess *session.Session, role string) *ecr.ECR { func getECRClient(sess *session.Session, role string, externalId string) *ecr.ECR {
if role == "" { if role == "" {
return ecr.New(sess) return ecr.New(sess)
} }
return ecr.New(sess, &aws.Config{ if externalId != "" {
Credentials: stscreds.NewCredentials(sess, role), return ecr.New(sess, &aws.Config{
}) Credentials: stscreds.NewCredentials(sess, role, func(p *stscreds.AssumeRoleProvider) {
p.ExternalID = &externalId
}),
})
} else {
return ecr.New(sess, &aws.Config{
Credentials: stscreds.NewCredentials(sess, role),
})
}
} }
+52 -33
View File
@@ -53,7 +53,9 @@ type (
Compress bool // Docker build compress Compress bool // Docker build compress
Repo string // Docker build repository Repo string // Docker build repository
LabelSchema []string // label-schema Label map LabelSchema []string // label-schema Label map
AutoLabel bool // auto-label bool
Labels []string // Label map Labels []string // Label map
Link string // Git repo link
NoCache bool // Docker build no-cache NoCache bool // Docker build no-cache
AddHost []string // Docker build add-host AddHost []string // Docker build add-host
Quiet bool // Docker build quiet Quiet bool // Docker build quiet
@@ -78,36 +80,24 @@ func (p Plugin) Exec() error {
// poll the docker daemon until it is started. This ensures the daemon is // poll the docker daemon until it is started. This ensures the daemon is
// ready to accept connections before we proceed. // ready to accept connections before we proceed.
for i := 0; i < 15; i++ { for i := 0; ; i++ {
cmd := commandInfo() cmd := commandInfo()
err := cmd.Run() err := cmd.Run()
if err == nil { if err == nil {
break break
} }
if i == 15 {
fmt.Println("Unable to reach Docker Daemon after 15 attempts.")
break
}
time.Sleep(time.Second * 1) time.Sleep(time.Second * 1)
} }
// Create Auth Config File // for debugging purposes, log the type of authentication
if p.Login.Config != "" { // credentials that have been provided.
os.MkdirAll(dockerHome, 0600)
path := filepath.Join(dockerHome, "config.json")
err := ioutil.WriteFile(path, []byte(p.Login.Config), 0600)
if err != nil {
return fmt.Errorf("Error writeing config.json: %s", err)
}
}
// login to the Docker registry
if p.Login.Password != "" {
cmd := commandLogin(p.Login)
err := cmd.Run()
if err != nil {
return fmt.Errorf("Error authenticating: %s", err)
}
}
switch { switch {
case p.Login.Password != "" && p.Login.Config != "":
fmt.Println("Detected registry credentials and registry credentials file")
case p.Login.Password != "": case p.Login.Password != "":
fmt.Println("Detected registry credentials") fmt.Println("Detected registry credentials")
case p.Login.Config != "": case p.Login.Config != "":
@@ -116,6 +106,29 @@ func (p Plugin) Exec() error {
fmt.Println("Registry credentials or Docker config not provided. Guest mode enabled.") fmt.Println("Registry credentials or Docker config not provided. Guest mode enabled.")
} }
// create Auth Config File
if p.Login.Config != "" {
os.MkdirAll(dockerHome, 0600)
path := filepath.Join(dockerHome, "config.json")
err := ioutil.WriteFile(path, []byte(p.Login.Config), 0600)
if err != nil {
return fmt.Errorf("Error writing config.json: %s", err)
}
}
// login to the Docker registry
if p.Login.Password != "" {
cmd := commandLogin(p.Login)
raw, err := cmd.CombinedOutput()
if err != nil {
out := string(raw)
out = strings.Replace(out, "WARNING! Using --password via the CLI is insecure. Use --password-stdin.", "", -1)
fmt.Println(out)
return fmt.Errorf("Error authenticating: exit status 1")
}
}
if p.Build.Squash && !p.Daemon.Experimental { if p.Build.Squash && !p.Daemon.Experimental {
fmt.Println("Squash build flag is only available when Docker deamon is started with experimental flag. Ignoring...") fmt.Println("Squash build flag is only available when Docker deamon is started with experimental flag. Ignoring...")
p.Build.Squash = false p.Build.Squash = false
@@ -252,19 +265,22 @@ func commandBuild(build Build) *exec.Cmd {
args = append(args, "--quiet") args = append(args, "--quiet")
} }
labelSchema := []string{ if build.AutoLabel {
"schema-version=1.0", labelSchema := []string{
fmt.Sprintf("build-date=%s", time.Now().Format(time.RFC3339)), fmt.Sprintf("created=%s", time.Now().Format(time.RFC3339)),
fmt.Sprintf("vcs-ref=%s", build.Name), fmt.Sprintf("revision=%s", build.Name),
fmt.Sprintf("vcs-url=%s", build.Remote), fmt.Sprintf("source=%s", build.Remote),
} fmt.Sprintf("url=%s", build.Link),
}
labelPrefix := "org.opencontainers.image"
if len(build.LabelSchema) > 0 { if len(build.LabelSchema) > 0 {
labelSchema = append(labelSchema, build.LabelSchema...) labelSchema = append(labelSchema, build.LabelSchema...)
} }
for _, label := range labelSchema { for _, label := range labelSchema {
args = append(args, "--label", fmt.Sprintf("org.label-schema.%s", label)) args = append(args, "--label", fmt.Sprintf("%s.%s", labelPrefix, label))
}
} }
if len(build.Labels) > 0 { if len(build.Labels) > 0 {
@@ -343,6 +359,10 @@ func commandDaemon(daemon Daemon) *exec.Cmd {
"--host=unix:///var/run/docker.sock", "--host=unix:///var/run/docker.sock",
} }
if _, err := os.Stat("/etc/docker/default.json"); err == nil {
args = append(args, "--seccomp-profile=/etc/docker/default.json")
}
if daemon.StorageDriver != "" { if daemon.StorageDriver != "" {
args = append(args, "-s", daemon.StorageDriver) args = append(args, "-s", daemon.StorageDriver)
} }
@@ -373,7 +393,6 @@ func commandDaemon(daemon Daemon) *exec.Cmd {
return exec.Command(dockerdExe, args...) return exec.Command(dockerdExe, args...)
} }
// helper to check if args match "docker prune" // helper to check if args match "docker prune"
func isCommandPrune(args []string) bool { func isCommandPrune(args []string) bool {
return len(args) > 3 && args[2] == "prune" return len(args) > 3 && args[2] == "prune"
@@ -1,5 +1,5 @@
# escape=` # escape=`
FROM plugins/docker:windows-1903-amd64 FROM plugins/docker:windows-1803
LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" ` LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" `
org.label-schema.name="Drone ACR" ` org.label-schema.name="Drone ACR" `
+1 -1
View File
@@ -1,5 +1,5 @@
# escape=` # escape=`
FROM plugins/docker:windows-1809-amd64 FROM plugins/docker:windows-1809
LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" ` LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" `
org.label-schema.name="Drone ACR" ` org.label-schema.name="Drone ACR" `
-10
View File
@@ -1,10 +0,0 @@
# escape=`
FROM plugins/docker:windows-1909-amd64
LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" `
org.label-schema.name="Drone ACR" `
org.label-schema.vendor="Drone.IO Community" `
org.label-schema.schema-version="1.0"
ADD release/windows/amd64/drone-acr.exe C:/bin/drone-acr.exe
ENTRYPOINT [ "C:\\bin\\drone-acr.exe" ]
-10
View File
@@ -1,10 +0,0 @@
# escape=`
FROM plugins/docker:windows-2004-amd64
LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" `
org.label-schema.name="Drone ACR" `
org.label-schema.vendor="Drone.IO Community" `
org.label-schema.schema-version="1.0"
ADD release/windows/amd64/drone-acr.exe C:/bin/drone-acr.exe
ENTRYPOINT [ "C:\\bin\\drone-acr.exe" ]
+11 -18
View File
@@ -1,43 +1,36 @@
image: plugins/acr:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}} image: plugins/acr:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
{{#if build.tags}} {{#if build.tags}}
tags: tags:
{{#each build.tags}} {{#each build.tags}}
- {{this}} - {{this}}
{{/each}} {{/each}}
{{/if}} {{/if}}
manifests: manifests:
- image: plugins/acr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64 -
image: plugins/acr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
platform: platform:
architecture: amd64 architecture: amd64
os: linux os: linux
- image: plugins/acr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64 -
image: plugins/acr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
platform: platform:
architecture: arm64 architecture: arm64
os: linux os: linux
variant: v8 variant: v8
- image: plugins/acr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm -
image: plugins/acr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
platform: platform:
architecture: arm architecture: arm
os: linux os: linux
variant: v7 variant: v7
- image: plugins/acr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-2004-amd64 -
image: plugins/acr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1803
platform: platform:
architecture: amd64 architecture: amd64
os: windows os: windows
version: 2004 version: 1803
- image: plugins/acr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1909-amd64 -
platform: image: plugins/acr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1809
architecture: amd64
os: windows
version: 1909
- image: plugins/acr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1903-amd64
platform:
architecture: amd64
os: windows
version: 1903
- image: plugins/acr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1809-amd64
platform: platform:
architecture: amd64 architecture: amd64
os: windows os: windows
+9
View File
@@ -2,5 +2,14 @@ FROM arm32v6/docker:19.03.8-dind
ENV DOCKER_HOST=unix:///var/run/docker.sock ENV DOCKER_HOST=unix:///var/run/docker.sock
RUN apk --update add --virtual .build-deps curl && \
mkdir -p /etc/docker/ && \
curl -SsL -o /etc/docker/default.json https://raw.githubusercontent.com/moby/moby/19.03/profiles/seccomp/default.json && \
sed -i 's/SCMP_ACT_ERRNO/SCMP_ACT_TRACE/g' /etc/docker/default.json && \
chmod 600 /etc/docker/default.json && \
apk del .build-deps && \
rm -rf /var/cache/apk/* && \
rm -rf /tmp/*
ADD release/linux/arm/drone-docker /bin/ ADD release/linux/arm/drone-docker /bin/
ENTRYPOINT ["/usr/local/bin/dockerd-entrypoint.sh", "/bin/drone-docker"] ENTRYPOINT ["/usr/local/bin/dockerd-entrypoint.sh", "/bin/drone-docker"]
@@ -1,11 +1,11 @@
# escape=` # escape=`
FROM mcr.microsoft.com/windows/servercore:2004 as download FROM mcr.microsoft.com/windows/servercore:1803 as download
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
ENV DOCKER_VERSION 19.03.1 ENV DOCKER_VERSION 18.09.1
RUN Invoke-WebRequest 'http://constexpr.org/innoextract/files/innoextract-1.9-windows.zip' -OutFile 'innoextract.zip' -UseBasicParsing ; ` RUN Invoke-WebRequest 'http://constexpr.org/innoextract/files/innoextract-1.6-windows.zip' -OutFile 'innoextract.zip' -UseBasicParsing ; `
Expand-Archive innoextract.zip -DestinationPath C:\ ; ` Expand-Archive innoextract.zip -DestinationPath C:\ ; `
Remove-Item -Path innoextract.zip Remove-Item -Path innoextract.zip
@@ -13,8 +13,7 @@ RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tl
Invoke-WebRequest $('https://github.com/docker/toolbox/releases/download/v{0}/DockerToolbox-{0}.exe' -f $env:DOCKER_VERSION) -OutFile 'dockertoolbox.exe' -UseBasicParsing Invoke-WebRequest $('https://github.com/docker/toolbox/releases/download/v{0}/DockerToolbox-{0}.exe' -f $env:DOCKER_VERSION) -OutFile 'dockertoolbox.exe' -UseBasicParsing
RUN /innoextract.exe dockertoolbox.exe RUN /innoextract.exe dockertoolbox.exe
FROM plugins/base:windows-2004-amd64 FROM plugins/base:windows-1803
USER ContainerAdministrator
LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" ` LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" `
org.label-schema.name="Drone Docker" ` org.label-schema.name="Drone Docker" `
+3 -3
View File
@@ -3,9 +3,9 @@ FROM mcr.microsoft.com/windows/servercore:1809 as download
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
ENV DOCKER_VERSION 19.03.1 ENV DOCKER_VERSION 18.09.1
RUN Invoke-WebRequest 'http://constexpr.org/innoextract/files/innoextract-1.9-windows.zip' -OutFile 'innoextract.zip' -UseBasicParsing ; ` RUN Invoke-WebRequest 'http://constexpr.org/innoextract/files/innoextract-1.6-windows.zip' -OutFile 'innoextract.zip' -UseBasicParsing ; `
Expand-Archive innoextract.zip -DestinationPath C:\ ; ` Expand-Archive innoextract.zip -DestinationPath C:\ ; `
Remove-Item -Path innoextract.zip Remove-Item -Path innoextract.zip
@@ -13,7 +13,7 @@ RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tl
Invoke-WebRequest $('https://github.com/docker/toolbox/releases/download/v{0}/DockerToolbox-{0}.exe' -f $env:DOCKER_VERSION) -OutFile 'dockertoolbox.exe' -UseBasicParsing Invoke-WebRequest $('https://github.com/docker/toolbox/releases/download/v{0}/DockerToolbox-{0}.exe' -f $env:DOCKER_VERSION) -OutFile 'dockertoolbox.exe' -UseBasicParsing
RUN /innoextract.exe dockertoolbox.exe RUN /innoextract.exe dockertoolbox.exe
FROM plugins/base:windows-1809-amd64 FROM mcr.microsoft.com/windows/nanoserver:1809
USER ContainerAdministrator USER ContainerAdministrator
LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" ` LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" `
+3 -2
View File
@@ -5,7 +5,7 @@ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPref
ENV DOCKER_VERSION 19.03.1 ENV DOCKER_VERSION 19.03.1
RUN Invoke-WebRequest 'http://constexpr.org/innoextract/files/innoextract-1.9-windows.zip' -OutFile 'innoextract.zip' -UseBasicParsing ; ` RUN Invoke-WebRequest 'http://constexpr.org/innoextract/files/innoextract-1.7-windows.zip' -OutFile 'innoextract.zip' -UseBasicParsing ; `
Expand-Archive innoextract.zip -DestinationPath C:\ ; ` Expand-Archive innoextract.zip -DestinationPath C:\ ; `
Remove-Item -Path innoextract.zip Remove-Item -Path innoextract.zip
@@ -13,7 +13,7 @@ RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tl
Invoke-WebRequest $('https://github.com/docker/toolbox/releases/download/v{0}/DockerToolbox-{0}.exe' -f $env:DOCKER_VERSION) -OutFile 'dockertoolbox.exe' -UseBasicParsing Invoke-WebRequest $('https://github.com/docker/toolbox/releases/download/v{0}/DockerToolbox-{0}.exe' -f $env:DOCKER_VERSION) -OutFile 'dockertoolbox.exe' -UseBasicParsing
RUN /innoextract.exe dockertoolbox.exe RUN /innoextract.exe dockertoolbox.exe
FROM plugins/base:windows-1903-amd64 FROM mcr.microsoft.com/windows/nanoserver:1903
USER ContainerAdministrator USER ContainerAdministrator
LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" ` LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" `
@@ -21,6 +21,7 @@ LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" `
org.label-schema.vendor="Drone.IO Community" ` org.label-schema.vendor="Drone.IO Community" `
org.label-schema.schema-version="1.0" org.label-schema.schema-version="1.0"
RUN mkdir C:\bin
COPY --from=download /windows/system32/netapi32.dll /windows/system32/netapi32.dll COPY --from=download /windows/system32/netapi32.dll /windows/system32/netapi32.dll
COPY --from=download /app/docker.exe C:/bin/docker.exe COPY --from=download /app/docker.exe C:/bin/docker.exe
ADD release/windows/amd64/drone-docker.exe C:/bin/drone-docker.exe ADD release/windows/amd64/drone-docker.exe C:/bin/drone-docker.exe
+3 -2
View File
@@ -5,7 +5,7 @@ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPref
ENV DOCKER_VERSION 19.03.1 ENV DOCKER_VERSION 19.03.1
RUN Invoke-WebRequest 'http://constexpr.org/innoextract/files/innoextract-1.9-windows.zip' -OutFile 'innoextract.zip' -UseBasicParsing ; ` RUN Invoke-WebRequest 'http://constexpr.org/innoextract/files/innoextract-1.7-windows.zip' -OutFile 'innoextract.zip' -UseBasicParsing ; `
Expand-Archive innoextract.zip -DestinationPath C:\ ; ` Expand-Archive innoextract.zip -DestinationPath C:\ ; `
Remove-Item -Path innoextract.zip Remove-Item -Path innoextract.zip
@@ -13,7 +13,7 @@ RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tl
Invoke-WebRequest $('https://github.com/docker/toolbox/releases/download/v{0}/DockerToolbox-{0}.exe' -f $env:DOCKER_VERSION) -OutFile 'dockertoolbox.exe' -UseBasicParsing Invoke-WebRequest $('https://github.com/docker/toolbox/releases/download/v{0}/DockerToolbox-{0}.exe' -f $env:DOCKER_VERSION) -OutFile 'dockertoolbox.exe' -UseBasicParsing
RUN /innoextract.exe dockertoolbox.exe RUN /innoextract.exe dockertoolbox.exe
FROM plugins/base:windows-1909-amd64 FROM mcr.microsoft.com/windows/nanoserver:1909
USER ContainerAdministrator USER ContainerAdministrator
LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" ` LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" `
@@ -21,6 +21,7 @@ LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" `
org.label-schema.vendor="Drone.IO Community" ` org.label-schema.vendor="Drone.IO Community" `
org.label-schema.schema-version="1.0" org.label-schema.schema-version="1.0"
RUN mkdir C:\bin
COPY --from=download /windows/system32/netapi32.dll /windows/system32/netapi32.dll COPY --from=download /windows/system32/netapi32.dll /windows/system32/netapi32.dll
COPY --from=download /app/docker.exe C:/bin/docker.exe COPY --from=download /app/docker.exe C:/bin/docker.exe
ADD release/windows/amd64/drone-docker.exe C:/bin/drone-docker.exe ADD release/windows/amd64/drone-docker.exe C:/bin/drone-docker.exe
+23 -18
View File
@@ -1,44 +1,49 @@
image: plugins/docker:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}} image: plugins/docker:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
{{#if build.tags}} {{#if build.tags}}
tags: tags:
{{#each build.tags}} {{#each build.tags}}
- {{this}} - {{this}}
{{/each}} {{/each}}
{{/if}} {{/if}}
manifests: manifests:
- image: plugins/docker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64 -
image: plugins/docker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
platform: platform:
architecture: amd64 architecture: amd64
os: linux os: linux
- image: plugins/docker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64 -
image: plugins/docker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
platform: platform:
architecture: arm64 architecture: arm64
os: linux os: linux
variant: v8 variant: v8
- image: plugins/docker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm -
image: plugins/docker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
platform: platform:
architecture: arm architecture: arm
os: linux os: linux
variant: v7 variant: v7
- image: plugins/docker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-2004-amd64 -
image: plugins/docker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1803
platform: platform:
architecture: amd64 architecture: amd64
os: windows os: windows
version: 2004 version: 1803
- image: plugins/docker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1909-amd64 -
platform: image: plugins/docker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1809-amd64
architecture: amd64
os: windows
version: 1909
- image: plugins/docker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1903-amd64
platform:
architecture: amd64
os: windows
version: 1903
- image: plugins/docker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1809-amd64
platform: platform:
architecture: amd64 architecture: amd64
os: windows os: windows
version: 1809 version: 1809
-
image: plugins/docker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1903-amd64
platform:
architecture: amd64
os: windows
version: 1903
-
image: plugins/docker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1909-amd64
platform:
architecture: amd64
os: windows
version: 1909
@@ -1,5 +1,5 @@
# escape=` # escape=`
FROM plugins/docker:windows-1909-amd64 FROM plugins/docker:windows-1803
LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" ` LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" `
org.label-schema.name="Drone ECR" ` org.label-schema.name="Drone ECR" `
+1 -1
View File
@@ -1,5 +1,5 @@
# escape=` # escape=`
FROM plugins/docker:windows-1809-amd64 FROM plugins/docker:windows-1809
LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" ` LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" `
org.label-schema.name="Drone ECR" ` org.label-schema.name="Drone ECR" `
-10
View File
@@ -1,10 +0,0 @@
# escape=`
FROM plugins/docker:windows-1903-amd64
LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" `
org.label-schema.name="Drone ECR" `
org.label-schema.vendor="Drone.IO Community" `
org.label-schema.schema-version="1.0"
ADD release/windows/amd64/drone-ecr.exe C:/bin/drone-ecr.exe
ENTRYPOINT [ "C:\\bin\\drone-ecr.exe" ]
-10
View File
@@ -1,10 +0,0 @@
# escape=`
FROM plugins/docker:windows-2004-amd64
LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" `
org.label-schema.name="Drone ECR" `
org.label-schema.vendor="Drone.IO Community" `
org.label-schema.schema-version="1.0"
ADD release/windows/amd64/drone-ecr.exe C:/bin/drone-ecr.exe
ENTRYPOINT [ "C:\\bin\\drone-ecr.exe" ]
+11 -18
View File
@@ -1,43 +1,36 @@
image: plugins/ecr:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}} image: plugins/ecr:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
{{#if build.tags}} {{#if build.tags}}
tags: tags:
{{#each build.tags}} {{#each build.tags}}
- {{this}} - {{this}}
{{/each}} {{/each}}
{{/if}} {{/if}}
manifests: manifests:
- image: plugins/ecr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64 -
image: plugins/ecr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
platform: platform:
architecture: amd64 architecture: amd64
os: linux os: linux
- image: plugins/ecr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64 -
image: plugins/ecr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
platform: platform:
architecture: arm64 architecture: arm64
os: linux os: linux
variant: v8 variant: v8
- image: plugins/ecr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm -
image: plugins/ecr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
platform: platform:
architecture: arm architecture: arm
os: linux os: linux
variant: v7 variant: v7
- image: plugins/ecr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-2004-amd64 -
image: plugins/ecr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1803
platform: platform:
architecture: amd64 architecture: amd64
os: windows os: windows
version: 2004 version: 1803
- image: plugins/ecr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1909-amd64 -
platform: image: plugins/ecr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1809
architecture: amd64
os: windows
version: 1909
- image: plugins/ecr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1903-amd64
platform:
architecture: amd64
os: windows
version: 1903
- image: plugins/ecr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1809-amd64
platform: platform:
architecture: amd64 architecture: amd64
os: windows os: windows
@@ -1,5 +1,5 @@
# escape=` # escape=`
FROM plugins/docker:windows-1903-amd64 FROM plugins/docker:windows-1803
LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" ` LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" `
org.label-schema.name="Drone GCR" ` org.label-schema.name="Drone GCR" `
+1 -1
View File
@@ -1,5 +1,5 @@
# escape=` # escape=`
FROM plugins/docker:windows-1809-amd64 FROM plugins/docker:windows-1809
LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" ` LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" `
org.label-schema.name="Drone GCR" ` org.label-schema.name="Drone GCR" `
-10
View File
@@ -1,10 +0,0 @@
# escape=`
FROM plugins/docker:windows-1909-amd64
LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" `
org.label-schema.name="Drone GCR" `
org.label-schema.vendor="Drone.IO Community" `
org.label-schema.schema-version="1.0"
ADD release/windows/amd64/drone-gcr.exe C:/bin/drone-gcr.exe
ENTRYPOINT [ "C:\\bin\\drone-gcr.exe" ]
-10
View File
@@ -1,10 +0,0 @@
# escape=`
FROM plugins/docker:windows-2004-amd64
LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" `
org.label-schema.name="Drone GCR" `
org.label-schema.vendor="Drone.IO Community" `
org.label-schema.schema-version="1.0"
ADD release/windows/amd64/drone-gcr.exe C:/bin/drone-gcr.exe
ENTRYPOINT [ "C:\\bin\\drone-gcr.exe" ]
+11 -18
View File
@@ -1,43 +1,36 @@
image: plugins/gcr:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}} image: plugins/gcr:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
{{#if build.tags}} {{#if build.tags}}
tags: tags:
{{#each build.tags}} {{#each build.tags}}
- {{this}} - {{this}}
{{/each}} {{/each}}
{{/if}} {{/if}}
manifests: manifests:
- image: plugins/gcr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64 -
image: plugins/gcr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
platform: platform:
architecture: amd64 architecture: amd64
os: linux os: linux
- image: plugins/gcr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64 -
image: plugins/gcr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
platform: platform:
architecture: arm64 architecture: arm64
os: linux os: linux
variant: v8 variant: v8
- image: plugins/gcr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm -
image: plugins/gcr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
platform: platform:
architecture: arm architecture: arm
os: linux os: linux
variant: v7 variant: v7
- image: plugins/gcr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-2004-amd64 -
image: plugins/gcr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1803
platform: platform:
architecture: amd64 architecture: amd64
os: windows os: windows
version: 2004 version: 1803
- image: plugins/gcr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1909-amd64 -
platform: image: plugins/gcr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1809
architecture: amd64
os: windows
version: 1909
- image: plugins/gcr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1903-amd64
platform:
architecture: amd64
os: windows
version: 1903
- image: plugins/gcr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1809-amd64
platform: platform:
architecture: amd64 architecture: amd64
os: windows os: windows
+6 -5
View File
@@ -1,23 +1,24 @@
image: plugins/heroku:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}} image: plugins/heroku:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
{{#if build.tags}} {{#if build.tags}}
tags: tags:
{{#each build.tags}} {{#each build.tags}}
- {{this}} - {{this}}
{{/each}} {{/each}}
{{/if}} {{/if}}
manifests: manifests:
- image: plugins/heroku:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64 -
image: plugins/heroku:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
platform: platform:
architecture: amd64 architecture: amd64
os: linux os: linux
- image: plugins/heroku:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64 -
image: plugins/heroku:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
platform: platform:
architecture: arm64 architecture: arm64
os: linux os: linux
variant: v8 variant: v8
- image: plugins/heroku:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm -
image: plugins/heroku:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
platform: platform:
architecture: arm architecture: arm
os: linux os: linux
+1 -1
View File
@@ -5,7 +5,7 @@ local test_pipeline_name = 'testing';
local windows(os) = os == 'windows'; local windows(os) = os == 'windows';
local golang_image(os, version) = local golang_image(os, version) =
'golang:' + '1.11' + if windows(os) then '-windowsservercore-' + version else ''; 'golang:' + '1.13' + if windows(os) then '-windowsservercore-' + version else '';
{ {
test(os='linux', arch='amd64', version=''):: test(os='linux', arch='amd64', version='')::