mirror of
https://github.com/drone-plugins/drone-docker.git
synced 2026-06-14 22:12:20 +08:00
Compare commits
12 Commits
windows_img
...
v20.11.0
| Author | SHA1 | Date | |
|---|---|---|---|
| dc9bf3bc79 | |||
| 246dfb3c0e | |||
| 3593c4165c | |||
| 3922dcfea5 | |||
| 47dc8555ad | |||
| 0ffe085ddc | |||
| 80d227e138 | |||
| 64b6aa187d | |||
| 74ec8ac761 | |||
| 368583a464 | |||
| 28175f4003 | |||
| 85e715fd5d |
+401
-108
@@ -8,7 +8,7 @@ platform:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: vet
|
- name: vet
|
||||||
image: golang:1.13
|
image: golang:1.17.3
|
||||||
commands:
|
commands:
|
||||||
- go vet ./...
|
- go vet ./...
|
||||||
environment:
|
environment:
|
||||||
@@ -18,7 +18,7 @@ steps:
|
|||||||
path: /go
|
path: /go
|
||||||
|
|
||||||
- name: test
|
- name: test
|
||||||
image: golang:1.13
|
image: golang:1.17.3
|
||||||
commands:
|
commands:
|
||||||
- go test -cover ./...
|
- go test -cover ./...
|
||||||
environment:
|
environment:
|
||||||
@@ -40,7 +40,7 @@ trigger:
|
|||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: ssh
|
type: ssh
|
||||||
name: windows-1809-amd64-docker
|
name: windows-1809-docker
|
||||||
|
|
||||||
platform:
|
platform:
|
||||||
os: windows
|
os: windows
|
||||||
@@ -53,70 +53,197 @@ server:
|
|||||||
from_secret: windows_username
|
from_secret: windows_username
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build
|
- name: build_latest
|
||||||
commands:
|
|
||||||
# TODO use the new DRONE_SEMVER_SHORT environment variables to
|
|
||||||
# publish docker images for tag events.
|
|
||||||
- go build -o release/windows/amd64/drone-docker.exe ./cmd/drone-docker
|
|
||||||
- docker login -u $env:USERNAME -p $env:PASSWORD
|
|
||||||
- docker build -f docker/docker/Dockerfile.windows.1809 -t plugins/docker:windows-1809-amd64 .
|
|
||||||
- docker push plugins/docker:windows-1809-amd64
|
|
||||||
environment:
|
environment:
|
||||||
CGO_ENABLED: "0"
|
VERSION: 1809
|
||||||
|
REGISTRY: docker
|
||||||
USERNAME:
|
USERNAME:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
PASSWORD:
|
PASSWORD:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
|
commands:
|
||||||
|
- powershell.exe scripts/windows/latest.ps1
|
||||||
|
when:
|
||||||
|
event: [ push ]
|
||||||
|
|
||||||
trigger:
|
- name: build_tag
|
||||||
event:
|
environment:
|
||||||
- push
|
VERSION: 1809
|
||||||
|
REGISTRY: docker
|
||||||
|
USERNAME:
|
||||||
|
from_secret: docker_username
|
||||||
|
PASSWORD:
|
||||||
|
from_secret: docker_password
|
||||||
|
commands:
|
||||||
|
- powershell.exe scripts/windows/tag.ps1
|
||||||
|
when:
|
||||||
|
event: [ tag ]
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- testing
|
- testing
|
||||||
|
|
||||||
# ---
|
trigger:
|
||||||
# kind: pipeline
|
ref:
|
||||||
# type: ssh
|
- refs/heads/master
|
||||||
# name: windows-1903-amd64-docker
|
- refs/tags/*
|
||||||
|
|
||||||
# platform:
|
|
||||||
# os: windows
|
|
||||||
|
|
||||||
# server:
|
|
||||||
# host: windows.1903.amd64.plugins.drone.ci
|
|
||||||
# password:
|
|
||||||
# from_secret: windows_password
|
|
||||||
# user:
|
|
||||||
# from_secret: windows_username
|
|
||||||
|
|
||||||
# steps:
|
|
||||||
# - name: build
|
|
||||||
# commands:
|
|
||||||
# # TODO use the new DRONE_SEMVER_SHORT environment variables to
|
|
||||||
# # publish docker images for tag events.
|
|
||||||
# - go build -o release/windows/amd64/drone-docker.exe ./cmd/drone-docker
|
|
||||||
# - docker login -u $env:USERNAME -p $env:PASSWORD
|
|
||||||
# - docker build -f docker/docker/Dockerfile.windows.1903 -t plugins/docker:windows-1903-amd64 .
|
|
||||||
# - docker push plugins/docker:windows-1903-amd64
|
|
||||||
# environment:
|
|
||||||
# CGO_ENABLED: "0"
|
|
||||||
# USERNAME:
|
|
||||||
# from_secret: docker_username
|
|
||||||
# PASSWORD:
|
|
||||||
# from_secret: docker_password
|
|
||||||
|
|
||||||
# trigger:
|
|
||||||
# event:
|
|
||||||
# - push
|
|
||||||
|
|
||||||
# depends_on:
|
|
||||||
# - testing
|
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: ssh
|
type: ssh
|
||||||
name: windows-1909-amd64-docker
|
name: windows-1809-ecr
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: windows
|
||||||
|
|
||||||
|
server:
|
||||||
|
host: windows.1809.amd64.plugins.drone.ci
|
||||||
|
password:
|
||||||
|
from_secret: windows_password
|
||||||
|
user:
|
||||||
|
from_secret: windows_username
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build_latest
|
||||||
|
environment:
|
||||||
|
VERSION: 1809
|
||||||
|
REGISTRY: ecr
|
||||||
|
USERNAME:
|
||||||
|
from_secret: docker_username
|
||||||
|
PASSWORD:
|
||||||
|
from_secret: docker_password
|
||||||
|
commands:
|
||||||
|
- powershell.exe scripts/windows/latest.ps1
|
||||||
|
when:
|
||||||
|
event: [ push ]
|
||||||
|
|
||||||
|
- name: build_tag
|
||||||
|
environment:
|
||||||
|
VERSION: 1809
|
||||||
|
REGISTRY: ecr
|
||||||
|
USERNAME:
|
||||||
|
from_secret: docker_username
|
||||||
|
PASSWORD:
|
||||||
|
from_secret: docker_password
|
||||||
|
commands:
|
||||||
|
- powershell.exe scripts/windows/tag.ps1
|
||||||
|
when:
|
||||||
|
event: [ tag ]
|
||||||
|
|
||||||
|
depends_on:
|
||||||
|
- testing
|
||||||
|
- windows-1809-docker
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
ref:
|
||||||
|
- refs/heads/master
|
||||||
|
- refs/tags/*
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: ssh
|
||||||
|
name: windows-1809-gcr
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: windows
|
||||||
|
|
||||||
|
server:
|
||||||
|
host: windows.1809.amd64.plugins.drone.ci
|
||||||
|
password:
|
||||||
|
from_secret: windows_password
|
||||||
|
user:
|
||||||
|
from_secret: windows_username
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build_latest
|
||||||
|
environment:
|
||||||
|
VERSION: 1809
|
||||||
|
REGISTRY: gcr
|
||||||
|
USERNAME:
|
||||||
|
from_secret: docker_username
|
||||||
|
PASSWORD:
|
||||||
|
from_secret: docker_password
|
||||||
|
commands:
|
||||||
|
- powershell.exe scripts/windows/latest.ps1
|
||||||
|
when:
|
||||||
|
event: [ push ]
|
||||||
|
|
||||||
|
- name: build_tag
|
||||||
|
environment:
|
||||||
|
VERSION: 1809
|
||||||
|
REGISTRY: gcr
|
||||||
|
USERNAME:
|
||||||
|
from_secret: docker_username
|
||||||
|
PASSWORD:
|
||||||
|
from_secret: docker_password
|
||||||
|
commands:
|
||||||
|
- powershell.exe scripts/windows/tag.ps1
|
||||||
|
when:
|
||||||
|
event: [ tag ]
|
||||||
|
|
||||||
|
depends_on:
|
||||||
|
- testing
|
||||||
|
- windows-1809-ecr
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
ref:
|
||||||
|
- refs/heads/master
|
||||||
|
- refs/tags/*
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: ssh
|
||||||
|
name: windows-1809-acr
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: windows
|
||||||
|
|
||||||
|
server:
|
||||||
|
host: windows.1809.amd64.plugins.drone.ci
|
||||||
|
password:
|
||||||
|
from_secret: windows_password
|
||||||
|
user:
|
||||||
|
from_secret: windows_username
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build_latest
|
||||||
|
environment:
|
||||||
|
VERSION: 1809
|
||||||
|
REGISTRY: acr
|
||||||
|
USERNAME:
|
||||||
|
from_secret: docker_username
|
||||||
|
PASSWORD:
|
||||||
|
from_secret: docker_password
|
||||||
|
commands:
|
||||||
|
- powershell.exe scripts/windows/latest.ps1
|
||||||
|
when:
|
||||||
|
event: [ push ]
|
||||||
|
|
||||||
|
- name: build_tag
|
||||||
|
environment:
|
||||||
|
VERSION: 1809
|
||||||
|
REGISTRY: acr
|
||||||
|
USERNAME:
|
||||||
|
from_secret: docker_username
|
||||||
|
PASSWORD:
|
||||||
|
from_secret: docker_password
|
||||||
|
commands:
|
||||||
|
- powershell.exe scripts/windows/tag.ps1
|
||||||
|
when:
|
||||||
|
event: [ tag ]
|
||||||
|
|
||||||
|
depends_on:
|
||||||
|
- testing
|
||||||
|
- windows-1809-gcr
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
ref:
|
||||||
|
- refs/heads/master
|
||||||
|
- refs/tags/*
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: ssh
|
||||||
|
name: windows-1909-docker
|
||||||
|
|
||||||
platform:
|
platform:
|
||||||
os: windows
|
os: windows
|
||||||
@@ -129,28 +256,190 @@ server:
|
|||||||
from_secret: windows_username
|
from_secret: windows_username
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build
|
- name: build_latest
|
||||||
commands:
|
environment:
|
||||||
# TODO use the new DRONE_SEMVER_SHORT environment variables to
|
VERSION: 1909
|
||||||
# publish docker images for tag events.
|
REGISTRY: docker
|
||||||
- go build -o release/windows/amd64/drone-docker.exe ./cmd/drone-docker
|
USERNAME:
|
||||||
- docker login -u $env:USERNAME -p $env:PASSWORD
|
from_secret: docker_username
|
||||||
- docker build -f docker/docker/Dockerfile.windows.1909 -t plugins/docker:windows-1909-amd64 .
|
PASSWORD:
|
||||||
- docker push plugins/docker:windows-1909-amd64
|
from_secret: docker_password
|
||||||
environment:
|
commands:
|
||||||
CGO_ENABLED: "0"
|
- powershell.exe scripts/windows/latest.ps1
|
||||||
USERNAME:
|
when:
|
||||||
from_secret: docker_username
|
event: [ push ]
|
||||||
PASSWORD:
|
|
||||||
from_secret: docker_password
|
|
||||||
|
|
||||||
trigger:
|
- name: build_tag
|
||||||
event:
|
environment:
|
||||||
- push
|
VERSION: 1909
|
||||||
|
REGISTRY: docker
|
||||||
|
USERNAME:
|
||||||
|
from_secret: docker_username
|
||||||
|
PASSWORD:
|
||||||
|
from_secret: docker_password
|
||||||
|
commands:
|
||||||
|
- powershell.exe scripts/windows/tag.ps1
|
||||||
|
when:
|
||||||
|
event: [ tag ]
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- testing
|
- testing
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
ref:
|
||||||
|
- refs/heads/master
|
||||||
|
- refs/tags/*
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: ssh
|
||||||
|
name: windows-1909-ecr
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: windows
|
||||||
|
|
||||||
|
server:
|
||||||
|
host: windows.1909.amd64.plugins.drone.ci
|
||||||
|
password:
|
||||||
|
from_secret: windows_password
|
||||||
|
user:
|
||||||
|
from_secret: windows_username
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build_latest
|
||||||
|
environment:
|
||||||
|
VERSION: 1909
|
||||||
|
REGISTRY: ecr
|
||||||
|
USERNAME:
|
||||||
|
from_secret: docker_username
|
||||||
|
PASSWORD:
|
||||||
|
from_secret: docker_password
|
||||||
|
commands:
|
||||||
|
- powershell.exe scripts/windows/latest.ps1
|
||||||
|
when:
|
||||||
|
event: [ push ]
|
||||||
|
|
||||||
|
- name: build_tag
|
||||||
|
environment:
|
||||||
|
VERSION: 1909
|
||||||
|
REGISTRY: ecr
|
||||||
|
USERNAME:
|
||||||
|
from_secret: docker_username
|
||||||
|
PASSWORD:
|
||||||
|
from_secret: docker_password
|
||||||
|
commands:
|
||||||
|
- powershell.exe scripts/windows/tag.ps1
|
||||||
|
when:
|
||||||
|
event: [ tag ]
|
||||||
|
|
||||||
|
depends_on:
|
||||||
|
- testing
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
ref:
|
||||||
|
- refs/heads/master
|
||||||
|
- refs/tags/*
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: ssh
|
||||||
|
name: windows-1909-gcr
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: windows
|
||||||
|
|
||||||
|
server:
|
||||||
|
host: windows.1909.amd64.plugins.drone.ci
|
||||||
|
password:
|
||||||
|
from_secret: windows_password
|
||||||
|
user:
|
||||||
|
from_secret: windows_username
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build_latest
|
||||||
|
environment:
|
||||||
|
VERSION: 1909
|
||||||
|
REGISTRY: gcr
|
||||||
|
USERNAME:
|
||||||
|
from_secret: docker_username
|
||||||
|
PASSWORD:
|
||||||
|
from_secret: docker_password
|
||||||
|
commands:
|
||||||
|
- powershell.exe scripts/windows/latest.ps1
|
||||||
|
when:
|
||||||
|
event: [ push ]
|
||||||
|
|
||||||
|
- name: build_tag
|
||||||
|
environment:
|
||||||
|
VERSION: 1909
|
||||||
|
REGISTRY: gcr
|
||||||
|
USERNAME:
|
||||||
|
from_secret: docker_username
|
||||||
|
PASSWORD:
|
||||||
|
from_secret: docker_password
|
||||||
|
commands:
|
||||||
|
- powershell.exe scripts/windows/tag.ps1
|
||||||
|
when:
|
||||||
|
event: [ tag ]
|
||||||
|
|
||||||
|
depends_on:
|
||||||
|
- testing
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
ref:
|
||||||
|
- refs/heads/master
|
||||||
|
- refs/tags/*
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: ssh
|
||||||
|
name: windows-1909-acr
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: windows
|
||||||
|
|
||||||
|
server:
|
||||||
|
host: windows.1909.amd64.plugins.drone.ci
|
||||||
|
password:
|
||||||
|
from_secret: windows_password
|
||||||
|
user:
|
||||||
|
from_secret: windows_username
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build_latest
|
||||||
|
environment:
|
||||||
|
VERSION: 1909
|
||||||
|
REGISTRY: acr
|
||||||
|
USERNAME:
|
||||||
|
from_secret: docker_username
|
||||||
|
PASSWORD:
|
||||||
|
from_secret: docker_password
|
||||||
|
commands:
|
||||||
|
- powershell.exe scripts/windows/latest.ps1
|
||||||
|
when:
|
||||||
|
event: [ push ]
|
||||||
|
|
||||||
|
- name: build_tag
|
||||||
|
environment:
|
||||||
|
VERSION: 1909
|
||||||
|
REGISTRY: acr
|
||||||
|
USERNAME:
|
||||||
|
from_secret: docker_username
|
||||||
|
PASSWORD:
|
||||||
|
from_secret: docker_password
|
||||||
|
commands:
|
||||||
|
- powershell.exe scripts/windows/tag.ps1
|
||||||
|
when:
|
||||||
|
event: [ tag ]
|
||||||
|
|
||||||
|
depends_on:
|
||||||
|
- testing
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
ref:
|
||||||
|
- refs/heads/master
|
||||||
|
- refs/tags/*
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
name: linux-amd64-docker
|
name: linux-amd64-docker
|
||||||
@@ -161,7 +450,7 @@ platform:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build-push
|
- name: build-push
|
||||||
image: golang:1.13
|
image: golang:1.17.3
|
||||||
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:
|
||||||
@@ -173,7 +462,7 @@ steps:
|
|||||||
- tag
|
- tag
|
||||||
|
|
||||||
- name: build-tag
|
- name: build-tag
|
||||||
image: golang:1.13
|
image: golang:1.17.3
|
||||||
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:
|
||||||
@@ -184,7 +473,7 @@ steps:
|
|||||||
- tag
|
- tag
|
||||||
|
|
||||||
- name: executable
|
- name: executable
|
||||||
image: golang:1.13
|
image: golang:1.17.3
|
||||||
commands:
|
commands:
|
||||||
- ./release/linux/amd64/drone-docker --help
|
- ./release/linux/amd64/drone-docker --help
|
||||||
|
|
||||||
@@ -224,7 +513,7 @@ platform:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build-push
|
- name: build-push
|
||||||
image: golang:1.13
|
image: golang:1.17.3
|
||||||
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:
|
||||||
@@ -236,7 +525,7 @@ steps:
|
|||||||
- tag
|
- tag
|
||||||
|
|
||||||
- name: build-tag
|
- name: build-tag
|
||||||
image: golang:1.13
|
image: golang:1.17.3
|
||||||
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:
|
||||||
@@ -247,7 +536,7 @@ steps:
|
|||||||
- tag
|
- tag
|
||||||
|
|
||||||
- name: executable
|
- name: executable
|
||||||
image: golang:1.13
|
image: golang:1.17.3
|
||||||
commands:
|
commands:
|
||||||
- ./release/linux/arm64/drone-docker --help
|
- ./release/linux/arm64/drone-docker --help
|
||||||
|
|
||||||
@@ -287,7 +576,7 @@ platform:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build-push
|
- name: build-push
|
||||||
image: golang:1.13
|
image: golang:1.17.3
|
||||||
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:
|
||||||
@@ -299,7 +588,7 @@ steps:
|
|||||||
- tag
|
- tag
|
||||||
|
|
||||||
- name: build-tag
|
- name: build-tag
|
||||||
image: golang:1.13
|
image: golang:1.17.3
|
||||||
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:
|
||||||
@@ -310,7 +599,7 @@ steps:
|
|||||||
- tag
|
- tag
|
||||||
|
|
||||||
- name: executable
|
- name: executable
|
||||||
image: golang:1.13
|
image: golang:1.17.3
|
||||||
commands:
|
commands:
|
||||||
- ./release/linux/arm/drone-docker --help
|
- ./release/linux/arm/drone-docker --help
|
||||||
|
|
||||||
@@ -366,12 +655,11 @@ trigger:
|
|||||||
- "refs/tags/**"
|
- "refs/tags/**"
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- windows-1809-amd64-docker
|
- windows-1809-docker
|
||||||
- windows-1909-amd64-docker
|
- windows-1909-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
|
||||||
@@ -383,7 +671,7 @@ platform:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build-push
|
- name: build-push
|
||||||
image: golang:1.13
|
image: golang:1.17.3
|
||||||
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:
|
||||||
@@ -395,7 +683,7 @@ steps:
|
|||||||
- tag
|
- tag
|
||||||
|
|
||||||
- name: build-tag
|
- name: build-tag
|
||||||
image: golang:1.13
|
image: golang:1.17.3
|
||||||
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:
|
||||||
@@ -441,7 +729,7 @@ platform:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build-push
|
- name: build-push
|
||||||
image: golang:1.13
|
image: golang:1.17.3
|
||||||
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:
|
||||||
@@ -453,7 +741,7 @@ steps:
|
|||||||
- tag
|
- tag
|
||||||
|
|
||||||
- name: build-tag
|
- name: build-tag
|
||||||
image: golang:1.13
|
image: golang:1.17.3
|
||||||
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:
|
||||||
@@ -499,7 +787,7 @@ platform:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build-push
|
- name: build-push
|
||||||
image: golang:1.13
|
image: golang:1.17.3
|
||||||
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:
|
||||||
@@ -511,7 +799,7 @@ steps:
|
|||||||
- tag
|
- tag
|
||||||
|
|
||||||
- name: build-tag
|
- name: build-tag
|
||||||
image: golang:1.13
|
image: golang:1.17.3
|
||||||
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:
|
||||||
@@ -573,6 +861,8 @@ trigger:
|
|||||||
- "refs/tags/**"
|
- "refs/tags/**"
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
|
- windows-1809-gcr
|
||||||
|
- windows-1909-gcr
|
||||||
- linux-amd64-gcr
|
- linux-amd64-gcr
|
||||||
- linux-arm64-gcr
|
- linux-arm64-gcr
|
||||||
- linux-arm-gcr
|
- linux-arm-gcr
|
||||||
@@ -587,7 +877,7 @@ platform:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build-push
|
- name: build-push
|
||||||
image: golang:1.13
|
image: golang:1.17.3
|
||||||
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:
|
||||||
@@ -599,7 +889,7 @@ steps:
|
|||||||
- tag
|
- tag
|
||||||
|
|
||||||
- name: build-tag
|
- name: build-tag
|
||||||
image: golang:1.13
|
image: golang:1.17.3
|
||||||
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:
|
||||||
@@ -645,7 +935,7 @@ platform:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build-push
|
- name: build-push
|
||||||
image: golang:1.13
|
image: golang:1.17.3
|
||||||
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:
|
||||||
@@ -657,7 +947,7 @@ steps:
|
|||||||
- tag
|
- tag
|
||||||
|
|
||||||
- name: build-tag
|
- name: build-tag
|
||||||
image: golang:1.13
|
image: golang:1.17.3
|
||||||
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:
|
||||||
@@ -703,7 +993,7 @@ platform:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build-push
|
- name: build-push
|
||||||
image: golang:1.13
|
image: golang:1.17.3
|
||||||
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:
|
||||||
@@ -715,7 +1005,7 @@ steps:
|
|||||||
- tag
|
- tag
|
||||||
|
|
||||||
- name: build-tag
|
- name: build-tag
|
||||||
image: golang:1.13
|
image: golang:1.17.3
|
||||||
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:
|
||||||
@@ -777,6 +1067,8 @@ trigger:
|
|||||||
- "refs/tags/**"
|
- "refs/tags/**"
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
|
- windows-1809-ecr
|
||||||
|
- windows-1909-ecr
|
||||||
- linux-amd64-ecr
|
- linux-amd64-ecr
|
||||||
- linux-arm64-ecr
|
- linux-arm64-ecr
|
||||||
- linux-arm-ecr
|
- linux-arm-ecr
|
||||||
@@ -791,7 +1083,7 @@ platform:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build-push
|
- name: build-push
|
||||||
image: golang:1.13
|
image: golang:1.17.3
|
||||||
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:
|
||||||
@@ -803,7 +1095,7 @@ steps:
|
|||||||
- tag
|
- tag
|
||||||
|
|
||||||
- name: build-tag
|
- name: build-tag
|
||||||
image: golang:1.13
|
image: golang:1.17.3
|
||||||
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:
|
||||||
@@ -849,7 +1141,7 @@ platform:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build-push
|
- name: build-push
|
||||||
image: golang:1.13
|
image: golang:1.17.3
|
||||||
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:
|
||||||
@@ -861,7 +1153,7 @@ steps:
|
|||||||
- tag
|
- tag
|
||||||
|
|
||||||
- name: build-tag
|
- name: build-tag
|
||||||
image: golang:1.13
|
image: golang:1.17.3
|
||||||
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:
|
||||||
@@ -907,7 +1199,7 @@ platform:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build-push
|
- name: build-push
|
||||||
image: golang:1.13
|
image: golang:1.17.3
|
||||||
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:
|
||||||
@@ -919,7 +1211,7 @@ steps:
|
|||||||
- tag
|
- tag
|
||||||
|
|
||||||
- name: build-tag
|
- name: build-tag
|
||||||
image: golang:1.13
|
image: golang:1.17.3
|
||||||
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:
|
||||||
@@ -995,7 +1287,7 @@ platform:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build-push
|
- name: build-push
|
||||||
image: golang:1.13
|
image: golang:1.17.3
|
||||||
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:
|
||||||
@@ -1007,7 +1299,7 @@ steps:
|
|||||||
- tag
|
- tag
|
||||||
|
|
||||||
- name: build-tag
|
- name: build-tag
|
||||||
image: golang:1.13
|
image: golang:1.17.3
|
||||||
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:
|
||||||
@@ -1053,7 +1345,7 @@ platform:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build-push
|
- name: build-push
|
||||||
image: golang:1.13
|
image: golang:1.17.3
|
||||||
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:
|
||||||
@@ -1065,7 +1357,7 @@ steps:
|
|||||||
- tag
|
- tag
|
||||||
|
|
||||||
- name: build-tag
|
- name: build-tag
|
||||||
image: golang:1.13
|
image: golang:1.17.3
|
||||||
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:
|
||||||
@@ -1111,7 +1403,7 @@ platform:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build-push
|
- name: build-push
|
||||||
image: golang:1.13
|
image: golang:1.17.3
|
||||||
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:
|
||||||
@@ -1123,7 +1415,7 @@ steps:
|
|||||||
- tag
|
- tag
|
||||||
|
|
||||||
- name: build-tag
|
- name: build-tag
|
||||||
image: golang:1.13
|
image: golang:1.17.3
|
||||||
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:
|
||||||
@@ -1184,9 +1476,10 @@ trigger:
|
|||||||
- "refs/tags/**"
|
- "refs/tags/**"
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
|
- windows-1809-acr
|
||||||
|
- windows-1909-acr
|
||||||
- linux-amd64-acr
|
- linux-amd64-acr
|
||||||
- linux-arm64-acr
|
- linux-arm64-acr
|
||||||
- linux-arm-acr
|
- linux-arm-acr
|
||||||
|
|
||||||
|
|
||||||
...
|
...
|
||||||
|
|||||||
+29
-1
@@ -1,11 +1,39 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## [v20.10.9](https://github.com/drone-plugins/drone-docker/tree/v20.10.9) (2021-11-02)
|
## [v20.11.0](https://github.com/drone-plugins/drone-docker/tree/v20.11.0) (2022-01-19)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/drone-plugins/drone-docker/compare/v20.10.9.1...v20.11.0)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- \(feat\) publish docker data to create drone card [\#347](https://github.com/drone-plugins/drone-docker/pull/347) ([eoinmcafee00](https://github.com/eoinmcafee00))
|
||||||
|
|
||||||
|
## [v20.10.9.1](https://github.com/drone-plugins/drone-docker/tree/v20.10.9.1) (2022-01-13)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/drone-plugins/drone-docker/compare/v20.10.9...v20.10.9.1)
|
||||||
|
|
||||||
|
**Implemented enhancements:**
|
||||||
|
|
||||||
|
- Serialize windows 1809 pipelines [\#348](https://github.com/drone-plugins/drone-docker/pull/348) ([shubham149](https://github.com/shubham149))
|
||||||
|
- Support for windows images for tags [\#346](https://github.com/drone-plugins/drone-docker/pull/346) ([shubham149](https://github.com/shubham149))
|
||||||
|
|
||||||
|
**Fixed bugs:**
|
||||||
|
|
||||||
|
- Fix ECR & GCR docker publish on windows [\#352](https://github.com/drone-plugins/drone-docker/pull/352) ([shubham149](https://github.com/shubham149))
|
||||||
|
- Fix windows docker builds [\#351](https://github.com/drone-plugins/drone-docker/pull/351) ([shubham149](https://github.com/shubham149))
|
||||||
|
- Fix powershell script to publish windows images [\#350](https://github.com/drone-plugins/drone-docker/pull/350) ([shubham149](https://github.com/shubham149))
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- release prep for 20.10.9.1 [\#353](https://github.com/drone-plugins/drone-docker/pull/353) ([eoinmcafee00](https://github.com/eoinmcafee00))
|
||||||
|
|
||||||
|
## [v20.10.9](https://github.com/drone-plugins/drone-docker/tree/v20.10.9) (2021-11-03)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/drone-plugins/drone-docker/compare/v19.03.9...v20.10.9)
|
[Full Changelog](https://github.com/drone-plugins/drone-docker/compare/v19.03.9...v20.10.9)
|
||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- bump to version 20.10.9: [\#342](https://github.com/drone-plugins/drone-docker/pull/342) ([eoinmcafee00](https://github.com/eoinmcafee00))
|
||||||
- Upgrade Docker dind to 20.10.9 for 64bit platforms [\#334](https://github.com/drone-plugins/drone-docker/pull/334) ([gzm0](https://github.com/gzm0))
|
- Upgrade Docker dind to 20.10.9 for 64bit platforms [\#334](https://github.com/drone-plugins/drone-docker/pull/334) ([gzm0](https://github.com/gzm0))
|
||||||
|
|
||||||
## [v19.03.9](https://github.com/drone-plugins/drone-docker/tree/v19.03.9) (2021-10-13)
|
## [v19.03.9](https://github.com/drone-plugins/drone-docker/tree/v19.03.9) (2021-10-13)
|
||||||
|
|||||||
@@ -0,0 +1,63 @@
|
|||||||
|
package docker
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/base64"
|
||||||
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
|
"io"
|
||||||
|
"io/ioutil"
|
||||||
|
"os"
|
||||||
|
"os/exec"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/drone/drone-go/drone"
|
||||||
|
|
||||||
|
"github.com/inhies/go-bytesize"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (p Plugin) writeCard() error {
|
||||||
|
cmd := exec.Command("docker", "inspect", p.Build.Name)
|
||||||
|
data, err := cmd.CombinedOutput()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
out := Inspect{}
|
||||||
|
if err := json.Unmarshal(data, &out); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
inspect := out[0]
|
||||||
|
inspect.SizeString = fmt.Sprint(bytesize.New(float64(inspect.Size)))
|
||||||
|
inspect.VirtualSizeString = fmt.Sprint(bytesize.New(float64(inspect.VirtualSize)))
|
||||||
|
inspect.Time = fmt.Sprint(inspect.Metadata.LastTagTime.Format(time.RFC3339))
|
||||||
|
cardData, _ := json.Marshal(inspect)
|
||||||
|
|
||||||
|
card := drone.CardInput{
|
||||||
|
Schema: "https://drone-plugins.github.io/drone-docker/card.json",
|
||||||
|
Data: cardData,
|
||||||
|
}
|
||||||
|
|
||||||
|
writeCard(p.CardPath, &card)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func writeCard(path string, card interface{}) {
|
||||||
|
data, _ := json.Marshal(card)
|
||||||
|
switch {
|
||||||
|
case path == "/dev/stdout":
|
||||||
|
writeCardTo(os.Stdout, data)
|
||||||
|
case path == "/dev/stderr":
|
||||||
|
writeCardTo(os.Stderr, data)
|
||||||
|
case path != "":
|
||||||
|
ioutil.WriteFile(path, data, 0644)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func writeCardTo(out io.Writer, data []byte) {
|
||||||
|
encoded := base64.StdEncoding.EncodeToString(data)
|
||||||
|
io.WriteString(out, "\u001B]1338;")
|
||||||
|
io.WriteString(out, encoded)
|
||||||
|
io.WriteString(out, "\u001B]0m")
|
||||||
|
io.WriteString(out, "\n")
|
||||||
|
}
|
||||||
@@ -7,6 +7,9 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/joho/godotenv"
|
"github.com/joho/godotenv"
|
||||||
|
"github.com/sirupsen/logrus"
|
||||||
|
|
||||||
|
docker "github.com/drone-plugins/drone-docker"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
@@ -40,12 +43,12 @@ func main() {
|
|||||||
os.Setenv("DOCKER_PASSWORD", password)
|
os.Setenv("DOCKER_PASSWORD", password)
|
||||||
|
|
||||||
// invoke the base docker plugin binary
|
// invoke the base docker plugin binary
|
||||||
cmd := exec.Command("drone-docker")
|
cmd := exec.Command(docker.GetDroneDockerExecCmd())
|
||||||
cmd.Stdout = os.Stdout
|
cmd.Stdout = os.Stdout
|
||||||
cmd.Stderr = os.Stderr
|
cmd.Stderr = os.Stderr
|
||||||
err := cmd.Run()
|
err := cmd.Run()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
os.Exit(1)
|
logrus.Fatal(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+35
-20
@@ -2,6 +2,7 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
|
"runtime"
|
||||||
|
|
||||||
"github.com/joho/godotenv"
|
"github.com/joho/godotenv"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
@@ -248,6 +249,11 @@ func main() {
|
|||||||
Usage: "additional host:IP mapping",
|
Usage: "additional host:IP mapping",
|
||||||
EnvVar: "PLUGIN_ADD_HOST",
|
EnvVar: "PLUGIN_ADD_HOST",
|
||||||
},
|
},
|
||||||
|
cli.StringFlag{
|
||||||
|
Name: "drone-card-path",
|
||||||
|
Usage: "card path location to write to",
|
||||||
|
EnvVar: "DRONE_CARD_PATH",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := app.Run(os.Args); err != nil {
|
if err := app.Run(os.Args); err != nil {
|
||||||
@@ -266,27 +272,28 @@ func run(c *cli.Context) error {
|
|||||||
Email: c.String("docker.email"),
|
Email: c.String("docker.email"),
|
||||||
Config: c.String("docker.config"),
|
Config: c.String("docker.config"),
|
||||||
},
|
},
|
||||||
|
CardPath: c.String("drone-card-path"),
|
||||||
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"),
|
||||||
AutoLabel: c.BoolT("auto-label"),
|
AutoLabel: c.BoolT("auto-label"),
|
||||||
Link: c.String("link"),
|
Link: c.String("link"),
|
||||||
NoCache: c.Bool("no-cache"),
|
NoCache: c.Bool("no-cache"),
|
||||||
AddHost: c.StringSlice("add-host"),
|
AddHost: c.StringSlice("add-host"),
|
||||||
Quiet: c.Bool("quiet"),
|
Quiet: c.Bool("quiet"),
|
||||||
},
|
},
|
||||||
Daemon: docker.Daemon{
|
Daemon: docker.Daemon{
|
||||||
Registry: c.String("docker.registry"),
|
Registry: c.String("docker.registry"),
|
||||||
@@ -327,3 +334,11 @@ func run(c *cli.Context) error {
|
|||||||
|
|
||||||
return plugin.Exec()
|
return plugin.Exec()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func GetExecCmd() string {
|
||||||
|
if runtime.GOOS == "windows" {
|
||||||
|
return "C:/bin/drone-docker.exe"
|
||||||
|
}
|
||||||
|
|
||||||
|
return "drone-docker"
|
||||||
|
}
|
||||||
|
|||||||
@@ -11,12 +11,15 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/joho/godotenv"
|
"github.com/joho/godotenv"
|
||||||
|
"github.com/sirupsen/logrus"
|
||||||
|
|
||||||
"github.com/aws/aws-sdk-go/aws"
|
"github.com/aws/aws-sdk-go/aws"
|
||||||
"github.com/aws/aws-sdk-go/aws/awserr"
|
"github.com/aws/aws-sdk-go/aws/awserr"
|
||||||
"github.com/aws/aws-sdk-go/aws/credentials/stscreds"
|
"github.com/aws/aws-sdk-go/aws/credentials/stscreds"
|
||||||
"github.com/aws/aws-sdk-go/aws/session"
|
"github.com/aws/aws-sdk-go/aws/session"
|
||||||
"github.com/aws/aws-sdk-go/service/ecr"
|
"github.com/aws/aws-sdk-go/service/ecr"
|
||||||
|
|
||||||
|
docker "github.com/drone-plugins/drone-docker"
|
||||||
)
|
)
|
||||||
|
|
||||||
const defaultRegion = "us-east-1"
|
const defaultRegion = "us-east-1"
|
||||||
@@ -110,11 +113,11 @@ func main() {
|
|||||||
os.Setenv("DOCKER_PASSWORD", password)
|
os.Setenv("DOCKER_PASSWORD", password)
|
||||||
|
|
||||||
// invoke the base docker plugin binary
|
// invoke the base docker plugin binary
|
||||||
cmd := exec.Command("drone-docker")
|
cmd := exec.Command(docker.GetDroneDockerExecCmd())
|
||||||
cmd.Stdout = os.Stdout
|
cmd.Stdout = os.Stdout
|
||||||
cmd.Stderr = os.Stderr
|
cmd.Stderr = os.Stderr
|
||||||
if err = cmd.Run(); err != nil {
|
if err = cmd.Run(); err != nil {
|
||||||
os.Exit(1)
|
logrus.Fatal(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,9 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/joho/godotenv"
|
"github.com/joho/godotenv"
|
||||||
|
"github.com/sirupsen/logrus"
|
||||||
|
|
||||||
|
docker "github.com/drone-plugins/drone-docker"
|
||||||
)
|
)
|
||||||
|
|
||||||
// gcr default username
|
// gcr default username
|
||||||
@@ -54,12 +57,12 @@ func main() {
|
|||||||
os.Setenv("DOCKER_PASSWORD", password)
|
os.Setenv("DOCKER_PASSWORD", password)
|
||||||
|
|
||||||
// invoke the base docker plugin binary
|
// invoke the base docker plugin binary
|
||||||
cmd := exec.Command("drone-docker")
|
cmd := exec.Command(docker.GetDroneDockerExecCmd())
|
||||||
cmd.Stdout = os.Stdout
|
cmd.Stdout = os.Stdout
|
||||||
cmd.Stderr = os.Stderr
|
cmd.Stderr = os.Stderr
|
||||||
err = cmd.Run()
|
err = cmd.Run()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
os.Exit(1)
|
logrus.Fatal(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
@@ -63,11 +64,34 @@ type (
|
|||||||
|
|
||||||
// Plugin defines the Docker plugin parameters.
|
// Plugin defines the Docker plugin parameters.
|
||||||
Plugin struct {
|
Plugin struct {
|
||||||
Login Login // Docker login configuration
|
Login Login // Docker login configuration
|
||||||
Build Build // Docker build configuration
|
Build Build // Docker build configuration
|
||||||
Daemon Daemon // Docker daemon configuration
|
Daemon Daemon // Docker daemon configuration
|
||||||
Dryrun bool // Docker push is skipped
|
Dryrun bool // Docker push is skipped
|
||||||
Cleanup bool // Docker purge is enabled
|
Cleanup bool // Docker purge is enabled
|
||||||
|
CardPath string // Card path to write file to
|
||||||
|
}
|
||||||
|
|
||||||
|
Inspect []struct {
|
||||||
|
ID string `json:"Id"`
|
||||||
|
RepoTags []string `json:"RepoTags"`
|
||||||
|
RepoDigests []interface{} `json:"RepoDigests"`
|
||||||
|
Parent string `json:"Parent"`
|
||||||
|
Comment string `json:"Comment"`
|
||||||
|
Created time.Time `json:"Created"`
|
||||||
|
Container string `json:"Container"`
|
||||||
|
DockerVersion string `json:"DockerVersion"`
|
||||||
|
Author string `json:"Author"`
|
||||||
|
Architecture string `json:"Architecture"`
|
||||||
|
Os string `json:"Os"`
|
||||||
|
Size int `json:"Size"`
|
||||||
|
VirtualSize int `json:"VirtualSize"`
|
||||||
|
Metadata struct {
|
||||||
|
LastTagTime time.Time `json:"LastTagTime"`
|
||||||
|
} `json:"Metadata"`
|
||||||
|
SizeString string
|
||||||
|
VirtualSizeString string
|
||||||
|
Time string
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -156,11 +180,6 @@ func (p Plugin) Exec() error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if p.Cleanup {
|
|
||||||
cmds = append(cmds, commandRmi(p.Build.Name)) // docker rmi
|
|
||||||
cmds = append(cmds, commandPrune()) // docker system prune -f
|
|
||||||
}
|
|
||||||
|
|
||||||
// execute all commands in batch mode.
|
// execute all commands in batch mode.
|
||||||
for _, cmd := range cmds {
|
for _, cmd := range cmds {
|
||||||
cmd.Stdout = os.Stdout
|
cmd.Stdout = os.Stdout
|
||||||
@@ -179,6 +198,26 @@ func (p Plugin) Exec() error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// output the adaptive card
|
||||||
|
if err := p.writeCard(); err != nil {
|
||||||
|
fmt.Printf("Could not create adaptive card. %s\n", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
// execute cleanup routines in batch mode
|
||||||
|
if p.Cleanup {
|
||||||
|
// clear the slice
|
||||||
|
cmds = nil
|
||||||
|
|
||||||
|
cmds = append(cmds, commandRmi(p.Build.Name)) // docker rmi
|
||||||
|
cmds = append(cmds, commandPrune()) // docker system prune -f
|
||||||
|
|
||||||
|
for _, cmd := range cmds {
|
||||||
|
cmd.Stdout = os.Stdout
|
||||||
|
cmd.Stderr = os.Stderr
|
||||||
|
trace(cmd)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -416,3 +455,11 @@ func commandRmi(tag string) *exec.Cmd {
|
|||||||
func trace(cmd *exec.Cmd) {
|
func trace(cmd *exec.Cmd) {
|
||||||
fmt.Fprintf(os.Stdout, "+ %s\n", strings.Join(cmd.Args, " "))
|
fmt.Fprintf(os.Stdout, "+ %s\n", strings.Join(cmd.Args, " "))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func GetDroneDockerExecCmd() string {
|
||||||
|
if runtime.GOOS == "windows" {
|
||||||
|
return "C:/bin/drone-docker.exe"
|
||||||
|
}
|
||||||
|
|
||||||
|
return "drone-docker"
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# escape=`
|
# escape=`
|
||||||
FROM plugins/docker:windows-1803
|
FROM plugins/docker:windows-1803-amd64
|
||||||
|
|
||||||
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,5 +1,5 @@
|
|||||||
# escape=`
|
# escape=`
|
||||||
FROM plugins/docker:windows-1809
|
FROM plugins/docker:windows-1809-amd64
|
||||||
|
|
||||||
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" `
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# 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" ]
|
||||||
@@ -24,14 +24,26 @@ manifests:
|
|||||||
os: linux
|
os: linux
|
||||||
variant: v7
|
variant: v7
|
||||||
-
|
-
|
||||||
image: plugins/acr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1803
|
image: plugins/acr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1803-amd64
|
||||||
platform:
|
platform:
|
||||||
architecture: amd64
|
architecture: amd64
|
||||||
os: windows
|
os: windows
|
||||||
version: 1803
|
version: 1803
|
||||||
-
|
-
|
||||||
image: plugins/acr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1809
|
image: plugins/acr:{{#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/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-1909-amd64
|
||||||
|
platform:
|
||||||
|
architecture: amd64
|
||||||
|
os: windows
|
||||||
|
version: 1909
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ manifests:
|
|||||||
os: linux
|
os: linux
|
||||||
variant: v7
|
variant: v7
|
||||||
-
|
-
|
||||||
image: plugins/docker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1803
|
image: plugins/docker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1803-amd64
|
||||||
platform:
|
platform:
|
||||||
architecture: amd64
|
architecture: amd64
|
||||||
os: windows
|
os: windows
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# escape=`
|
# escape=`
|
||||||
FROM plugins/docker:windows-1803
|
FROM plugins/docker:windows-1803-amd64
|
||||||
|
|
||||||
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,5 +1,5 @@
|
|||||||
# escape=`
|
# escape=`
|
||||||
FROM plugins/docker:windows-1809
|
FROM plugins/docker:windows-1809-amd64
|
||||||
|
|
||||||
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" `
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# escape=`
|
||||||
|
FROM plugins/docker:windows-1909-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" ]
|
||||||
@@ -24,14 +24,26 @@ manifests:
|
|||||||
os: linux
|
os: linux
|
||||||
variant: v7
|
variant: v7
|
||||||
-
|
-
|
||||||
image: plugins/ecr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1803
|
image: plugins/ecr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1803-amd64
|
||||||
platform:
|
platform:
|
||||||
architecture: amd64
|
architecture: amd64
|
||||||
os: windows
|
os: windows
|
||||||
version: 1803
|
version: 1803
|
||||||
-
|
-
|
||||||
image: plugins/ecr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1809
|
image: plugins/ecr:{{#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/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-1909-amd64
|
||||||
|
platform:
|
||||||
|
architecture: amd64
|
||||||
|
os: windows
|
||||||
|
version: 1909
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# escape=`
|
# escape=`
|
||||||
FROM plugins/docker:windows-1803
|
FROM plugins/docker:windows-1803-amd64
|
||||||
|
|
||||||
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,5 +1,5 @@
|
|||||||
# escape=`
|
# escape=`
|
||||||
FROM plugins/docker:windows-1809
|
FROM plugins/docker:windows-1809-amd64
|
||||||
|
|
||||||
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" `
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# 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" ]
|
||||||
@@ -24,14 +24,20 @@ manifests:
|
|||||||
os: linux
|
os: linux
|
||||||
variant: v7
|
variant: v7
|
||||||
-
|
-
|
||||||
image: plugins/gcr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1803
|
image: plugins/gcr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1803-amd64
|
||||||
platform:
|
platform:
|
||||||
architecture: amd64
|
architecture: amd64
|
||||||
os: windows
|
os: windows
|
||||||
version: 1803
|
version: 1803
|
||||||
-
|
-
|
||||||
image: plugins/gcr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1809
|
image: plugins/gcr:{{#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/gcr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1909-amd64
|
||||||
|
platform:
|
||||||
|
architecture: amd64
|
||||||
|
os: windows
|
||||||
|
version: 1909
|
||||||
|
|||||||
+118
@@ -0,0 +1,118 @@
|
|||||||
|
{
|
||||||
|
"type": "AdaptiveCard",
|
||||||
|
"body": [
|
||||||
|
{
|
||||||
|
"type": "ColumnSet",
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"type": "Column",
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"type": "Image",
|
||||||
|
"url": "https://d36jcksde1wxzq.cloudfront.net/be7833db9bddb4494d2a7c3dd659199a.png",
|
||||||
|
"size": "Medium"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"width": "auto"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Column",
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"type": "TextBlock",
|
||||||
|
"text": "${RepoTags[0]}",
|
||||||
|
"size": "Medium"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "TextBlock",
|
||||||
|
"text": "DIGEST: ${RepoDigests[0]}",
|
||||||
|
"wrap": true,
|
||||||
|
"size": "Small",
|
||||||
|
"weight": "Lighter",
|
||||||
|
"isSubtle": true,
|
||||||
|
"spacing": "Small"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "ColumnSet",
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"type": "Column",
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"type": "TextBlock",
|
||||||
|
"weight": "Lighter",
|
||||||
|
"text": "OS/ARCH",
|
||||||
|
"wrap": true,
|
||||||
|
"size": "Small",
|
||||||
|
"isSubtle": true,
|
||||||
|
"spacing": "Medium"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "TextBlock",
|
||||||
|
"text": "${OS}/${Architecture}",
|
||||||
|
"wrap": true,
|
||||||
|
"size": "Small",
|
||||||
|
"spacing": "Small"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"separator": true,
|
||||||
|
"width": "auto"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Column",
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"type": "TextBlock",
|
||||||
|
"weight": "Lighter",
|
||||||
|
"text": "SIZE",
|
||||||
|
"wrap": true,
|
||||||
|
"size": "Small",
|
||||||
|
"isSubtle": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "TextBlock",
|
||||||
|
"spacing": "Small",
|
||||||
|
"text": "${SizeString}",
|
||||||
|
"wrap": true,
|
||||||
|
"size": "Small"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"width": "auto",
|
||||||
|
"separator": true,
|
||||||
|
"spacing": "Medium"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Column",
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"type": "TextBlock",
|
||||||
|
"weight": "Lighter",
|
||||||
|
"text": "LAST PUSHED",
|
||||||
|
"wrap": true,
|
||||||
|
"size": "Small",
|
||||||
|
"isSubtle": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "TextBlock",
|
||||||
|
"spacing": "Small",
|
||||||
|
"text": "{{DATE(${Time})}} - {{TIME(${Time})}}",
|
||||||
|
"wrap": true,
|
||||||
|
"size": "Small"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"width": "auto",
|
||||||
|
"separator": true,
|
||||||
|
"spacing": "Medium"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"style": "default"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"width": "stretch"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
|
||||||
|
"version": "1.0"
|
||||||
|
}
|
||||||
@@ -2,12 +2,22 @@ module github.com/drone-plugins/drone-docker
|
|||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/aws/aws-sdk-go v1.26.7
|
github.com/aws/aws-sdk-go v1.26.7
|
||||||
github.com/coreos/go-semver v0.2.0
|
github.com/coreos/go-semver v0.3.0
|
||||||
|
github.com/drone/drone-go v1.7.1
|
||||||
|
github.com/inhies/go-bytesize v0.0.0-20210819104631-275770b98743
|
||||||
github.com/joho/godotenv v1.3.0
|
github.com/joho/godotenv v1.3.0
|
||||||
github.com/sirupsen/logrus v1.3.0
|
github.com/sirupsen/logrus v1.3.0
|
||||||
github.com/urfave/cli v1.22.2
|
github.com/urfave/cli v1.22.2
|
||||||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e // indirect
|
|
||||||
golang.org/x/text v0.3.0 // indirect
|
|
||||||
)
|
)
|
||||||
|
|
||||||
go 1.13
|
require (
|
||||||
|
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d // indirect
|
||||||
|
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af // indirect
|
||||||
|
github.com/konsorten/go-windows-terminal-sequences v1.0.1 // indirect
|
||||||
|
github.com/russross/blackfriday/v2 v2.0.1 // indirect
|
||||||
|
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
|
||||||
|
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793 // indirect
|
||||||
|
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33 // indirect
|
||||||
|
)
|
||||||
|
|
||||||
|
go 1.17
|
||||||
|
|||||||
@@ -1,12 +1,19 @@
|
|||||||
|
github.com/99designs/httpsignatures-go v0.0.0-20170731043157-88528bf4ca7e/go.mod h1:Xa6lInWHNQnuWoF0YPSsx+INFA9qk7/7pTjwb3PInkY=
|
||||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||||
github.com/aws/aws-sdk-go v1.26.7 h1:ObjEnmzvSdYy8KVd3me7v/UMyCn81inLy2SyoIPoBkg=
|
github.com/aws/aws-sdk-go v1.26.7 h1:ObjEnmzvSdYy8KVd3me7v/UMyCn81inLy2SyoIPoBkg=
|
||||||
github.com/aws/aws-sdk-go v1.26.7/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
|
github.com/aws/aws-sdk-go v1.26.7/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
|
||||||
github.com/coreos/go-semver v0.2.0 h1:3Jm3tLmsgAYcjC+4Up7hJrFBPr+n7rAqYeSw/SZazuY=
|
github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM=
|
||||||
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY=
|
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY=
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
|
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
|
||||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
|
github.com/drone/drone-go v1.7.1 h1:ZX+3Rs8YHUSUQ5mkuMLmm1zr1ttiiE2YGNxF3AnyDKw=
|
||||||
|
github.com/drone/drone-go v1.7.1/go.mod h1:fxCf9jAnXDZV1yDr0ckTuWd1intvcQwfJmTRpTZ1mXg=
|
||||||
|
github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ=
|
||||||
|
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||||
|
github.com/inhies/go-bytesize v0.0.0-20210819104631-275770b98743 h1:X3Xxno5Ji8idrNiUoFc7QyXpqhSYlDRYQmc7mlpMBzU=
|
||||||
|
github.com/inhies/go-bytesize v0.0.0-20210819104631-275770b98743/go.mod h1:KrtyD5PFj++GKkFS/7/RRrfnRhAMGQwy75GLCHWrCNs=
|
||||||
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM=
|
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM=
|
||||||
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
|
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
|
||||||
github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc=
|
github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc=
|
||||||
@@ -24,19 +31,12 @@ github.com/sirupsen/logrus v1.3.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx
|
|||||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||||
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
|
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
|
||||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||||
github.com/urfave/cli v1.20.0 h1:fDqGv3UG/4jbVl/QkFwEdddtEDjh/5Ov6X+0B/3bPaw=
|
|
||||||
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
|
|
||||||
github.com/urfave/cli v1.22.2 h1:gsqYFH8bb9ekPA12kRo0hfjngWQjkJPlN9R0N78BoUo=
|
github.com/urfave/cli v1.22.2 h1:gsqYFH8bb9ekPA12kRo0hfjngWQjkJPlN9R0N78BoUo=
|
||||||
github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
|
github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
|
||||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793 h1:u+LnwYTOOW7Ukr/fppxEb1Nwz0AtPflrblfvUudpo+I=
|
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793 h1:u+LnwYTOOW7Ukr/fppxEb1Nwz0AtPflrblfvUudpo+I=
|
||||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg=
|
|
||||||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
|
||||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33 h1:I6FyU15t786LL7oL/hn43zqTuEGr4PN7F4XJ1p4E3Y8=
|
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33 h1:I6FyU15t786LL7oL/hn43zqTuEGr4PN7F4XJ1p4E3Y8=
|
||||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
|
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
|
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
|
||||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
# this script is used by the continuous integration server to
|
||||||
|
# build and publish the docker image for a commit to master.
|
||||||
|
$ErrorActionPreference = "Stop"
|
||||||
|
|
||||||
|
$env:GOOS="windows"
|
||||||
|
$env:GOARCH="amd64"
|
||||||
|
$env:CGO_ENABLED="0"
|
||||||
|
|
||||||
|
if (-not (Test-Path env:VERSION)) {
|
||||||
|
$env:VERSION="1809"
|
||||||
|
}
|
||||||
|
|
||||||
|
if (-not (Test-Path env:REGISTRY)) {
|
||||||
|
$env:REGISTRY="docker"
|
||||||
|
}
|
||||||
|
|
||||||
|
echo $env:GOOS
|
||||||
|
echo $env:GOARCH
|
||||||
|
echo $env:VERSION
|
||||||
|
echo $env:REGISTRY
|
||||||
|
|
||||||
|
# build the binary
|
||||||
|
Write-Host "+ go build -o release/windows/amd64/drone-${env:REGISTRY}.exe ./cmd/drone-${env:REGISTRY}";
|
||||||
|
go build -o release/windows/amd64/drone-${env:REGISTRY}.exe ./cmd/drone-${env:REGISTRY}
|
||||||
|
|
||||||
|
# build and publish the docker image
|
||||||
|
docker login -u ${env:USERNAME} -p ${env:PASSWORD}
|
||||||
|
Write-Host "+ docker build -f docker/${env:REGISTRY}/Dockerfile.windows.amd64.${env:VERSION} -t plugins/${env:REGISTRY}:windows-${env:VERSION}-amd64 .";
|
||||||
|
docker build -f docker/${env:REGISTRY}/Dockerfile.windows.amd64.${env:VERSION} -t plugins/${env:REGISTRY}:windows-${env:VERSION}-amd64 .
|
||||||
|
Write-Host "+ docker push plugins/${env:REGISTRY}:windows-${env:VERSION}-amd64"
|
||||||
|
docker push plugins/${env:REGISTRY}:windows-${env:VERSION}-amd64
|
||||||
|
|
||||||
|
# remove images from local cache
|
||||||
|
Write-Host "+ docker rmi plugins/${env:REGISTRY}:windows-${env:VERSION}-amd64"
|
||||||
|
docker rmi plugins/${env:REGISTRY}:windows-${env:VERSION}-amd64
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
# this script is used by the continuous integration server to
|
||||||
|
# build and publish the docker image for a tagged revsision.
|
||||||
|
$ErrorActionPreference = "Stop"
|
||||||
|
|
||||||
|
$env:GOOS="windows"
|
||||||
|
$env:GOARCH="amd64"
|
||||||
|
$env:CGO_ENABLED="0"
|
||||||
|
|
||||||
|
if (-not (Test-Path env:VERSION)) {
|
||||||
|
$env:VERSION="1809"
|
||||||
|
}
|
||||||
|
|
||||||
|
if (-not (Test-Path env:DRONE_SEMVER_SHORT)) {
|
||||||
|
echo "missing semver"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
if (-not (Test-Path env:REGISTRY)) {
|
||||||
|
$env:REGISTRY="docker"
|
||||||
|
}
|
||||||
|
|
||||||
|
# define the image tags
|
||||||
|
$env:IMAGE_PATCH="plugins/${env:REGISTRY}:${env:DRONE_SEMVER_SHORT}-windows-${env:VERSION}-amd64"
|
||||||
|
$env:IMAGE_MAJOR="plugins/${env:REGISTRY}:${env:DRONE_SEMVER_MAJOR}-windows-${env:VERSION}-amd64"
|
||||||
|
$env:IMAGE_MINOR="plugins/${env:REGISTRY}:${env:DRONE_SEMVER_MAJOR}.${env:DRONE_SEMVER_MINOR}-windows-${env:VERSION}-amd64"
|
||||||
|
|
||||||
|
echo "build environment:"
|
||||||
|
echo $env:GOOS
|
||||||
|
echo $env:GOARCH
|
||||||
|
echo $env:VERSION
|
||||||
|
|
||||||
|
# build the binary
|
||||||
|
Write-Host "+ go build -o release/windows/amd64/drone-${env:REGISTRY}.exe ./cmd/drone-${env:REGISTRY}"
|
||||||
|
go build -o release/windows/amd64/drone-${env:REGISTRY}.exe ./cmd/drone-${env:REGISTRY}
|
||||||
|
|
||||||
|
# authenticate with the docker registry
|
||||||
|
docker login -u ${env:USERNAME} -p ${env:PASSWORD}
|
||||||
|
|
||||||
|
echo "building images:"
|
||||||
|
echo ${env:IMAGE_PATCH}
|
||||||
|
echo ${env:IMAGE_MINOR}
|
||||||
|
echo ${env:IMAGE_MAJOR}
|
||||||
|
|
||||||
|
# build and tag the docker images
|
||||||
|
Write-Host "+ docker build -f docker/${env:REGISTRY}/Dockerfile.windows.amd64.${env:VERSION} -t ${env:IMAGE_PATCH} ."
|
||||||
|
docker build -f docker/${env:REGISTRY}/Dockerfile.windows.amd64.${env:VERSION} -t ${env:IMAGE_PATCH} .
|
||||||
|
Write-Host "+ docker tag ${env:IMAGE_PATCH} ${env:IMAGE_MAJOR}"
|
||||||
|
docker tag ${env:IMAGE_PATCH} ${env:IMAGE_MAJOR}
|
||||||
|
Write-Host "+ docker tag ${env:IMAGE_PATCH} ${env:IMAGE_MINOR}"
|
||||||
|
docker tag ${env:IMAGE_PATCH} ${env:IMAGE_MINOR}
|
||||||
|
|
||||||
|
# publish the docker images
|
||||||
|
Write-Host "+ docker push ${env:IMAGE_MAJOR}"
|
||||||
|
docker push ${env:IMAGE_MAJOR}
|
||||||
|
Write-Host "+ docker push ${env:IMAGE_MINOR}"
|
||||||
|
docker push ${env:IMAGE_MINOR}
|
||||||
|
Write-Host "+ docker push ${env:IMAGE_PATCH}"
|
||||||
|
docker push ${env:IMAGE_PATCH}
|
||||||
|
|
||||||
|
# remove images after from local cache
|
||||||
|
Write-Host "+ docker rmi ${env:IMAGE_MAJOR}"
|
||||||
|
docker rmi ${env:IMAGE_MAJOR}
|
||||||
|
Write-Host "+ docker rmi ${env:IMAGE_MINOR}"
|
||||||
|
docker rmi ${env:IMAGE_MINOR}
|
||||||
|
Write-Host "+ docker rmi ${env:IMAGE_PATCH}"
|
||||||
|
docker rmi ${env:IMAGE_PATCH}
|
||||||
Reference in New Issue
Block a user