Compare commits
15 Commits
feature-fi
...
edge-dind
Author | SHA1 | Date | |
---|---|---|---|
c7b4b0c4f7 | |||
|
d0b9da388f | ||
|
332b73d3b0 | ||
aa80cf46f3 | |||
984e78e4c7 | |||
3e0e3c8cb5 | |||
d2940d43e2 | |||
91965e06ed | |||
9787e81f38 | |||
48ca97aeb5 | |||
d532d1b620 | |||
41993225d6 | |||
22d00cc6cb | |||
3bc2768d6f | |||
1ba922ee04 |
@ -4,47 +4,7 @@ local pipeline = import 'pipeline.libsonnet';
|
||||
pipeline.test('linux', 'amd64'),
|
||||
|
||||
pipeline.build('docker', 'linux', 'amd64'),
|
||||
pipeline.build('docker', 'linux', 'arm64'),
|
||||
pipeline.build('docker', 'linux', 'arm'),
|
||||
pipeline.notifications('docker', depends_on=[
|
||||
'linux-amd64',
|
||||
'linux-arm64',
|
||||
'linux-arm',
|
||||
]),
|
||||
|
||||
pipeline.build('gcr', 'linux', 'amd64'),
|
||||
pipeline.build('gcr', 'linux', 'arm64'),
|
||||
pipeline.build('gcr', 'linux', 'arm'),
|
||||
pipeline.notifications('gcr', depends_on=[
|
||||
'linux-amd64',
|
||||
'linux-arm64',
|
||||
'linux-arm',
|
||||
]),
|
||||
|
||||
pipeline.build('acr', 'linux', 'amd64'),
|
||||
pipeline.build('acr', 'linux', 'arm64'),
|
||||
pipeline.build('acr', 'linux', 'arm'),
|
||||
pipeline.notifications('acr', depends_on=[
|
||||
'linux-amd64',
|
||||
'linux-arm64',
|
||||
'linux-arm',
|
||||
]),
|
||||
|
||||
pipeline.build('ecr', 'linux', 'amd64'),
|
||||
pipeline.build('ecr', 'linux', 'arm64'),
|
||||
pipeline.build('ecr', 'linux', 'arm'),
|
||||
pipeline.notifications('ecr', depends_on=[
|
||||
'linux-amd64',
|
||||
'linux-arm64',
|
||||
'linux-arm',
|
||||
]),
|
||||
|
||||
pipeline.build('heroku', 'linux', 'amd64'),
|
||||
pipeline.build('heroku', 'linux', 'arm64'),
|
||||
pipeline.build('heroku', 'linux', 'arm'),
|
||||
pipeline.notifications('heroku', depends_on=[
|
||||
'linux-amd64',
|
||||
'linux-arm64',
|
||||
'linux-arm',
|
||||
]),
|
||||
]
|
||||
|
1402
.drone.yml
1402
.drone.yml
@ -34,412 +34,11 @@ volumes:
|
||||
trigger:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
- refs/heads/edge-dind
|
||||
- refs/heads/feature-*
|
||||
- "refs/tags/**"
|
||||
- "refs/pull/**"
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: ssh
|
||||
name: windows-1809-docker
|
||||
|
||||
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: docker
|
||||
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: docker
|
||||
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-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:
|
||||
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: docker
|
||||
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: docker
|
||||
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-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
|
||||
name: linux-amd64-docker
|
||||
@ -480,16 +79,22 @@ steps:
|
||||
- name: publish
|
||||
image: plugins/docker:18
|
||||
settings:
|
||||
auto_tag: true
|
||||
auto_tag_suffix: linux-amd64
|
||||
daemon_off: false
|
||||
dockerfile: docker/docker/Dockerfile.linux.amd64
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: plugins/docker
|
||||
tags:
|
||||
- latest
|
||||
- edge-dind
|
||||
- linux-amd64
|
||||
- ${DRONE_COMMIT_SHA:0:8}
|
||||
- ${DRONE_COMMIT_SHA:0:8}-edge-dind
|
||||
- ${DRONE_COMMIT_SHA:0:8}-linux-amd64
|
||||
repo: immawanderer/drone-docker
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
when:
|
||||
branch: [edge-dind]
|
||||
event:
|
||||
exclude:
|
||||
- pull_request
|
||||
@ -497,989 +102,12 @@ steps:
|
||||
trigger:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
- refs/heads/edge-dind
|
||||
- refs/heads/feature-*
|
||||
- "refs/tags/**"
|
||||
- "refs/pull/**"
|
||||
|
||||
depends_on:
|
||||
- testing
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: linux-arm64-docker
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: arm64
|
||||
|
||||
steps:
|
||||
- name: build-push
|
||||
image: golang:1.17.3
|
||||
commands:
|
||||
- "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/arm64/drone-docker ./cmd/drone-docker"
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GO111MODULE: on
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- tag
|
||||
|
||||
- name: build-tag
|
||||
image: golang:1.17.3
|
||||
commands:
|
||||
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm64/drone-docker ./cmd/drone-docker"
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GO111MODULE: on
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
|
||||
- name: executable
|
||||
image: golang:1.17.3
|
||||
commands:
|
||||
- ./release/linux/arm64/drone-docker --help
|
||||
|
||||
- name: publish
|
||||
image: plugins/docker:18
|
||||
settings:
|
||||
auto_tag: true
|
||||
auto_tag_suffix: linux-arm64
|
||||
daemon_off: false
|
||||
dockerfile: docker/docker/Dockerfile.linux.arm64
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: plugins/docker
|
||||
username:
|
||||
from_secret: docker_username
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- pull_request
|
||||
|
||||
trigger:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
- "refs/tags/**"
|
||||
- "refs/pull/**"
|
||||
|
||||
depends_on:
|
||||
- testing
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: linux-arm-docker
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: arm
|
||||
|
||||
steps:
|
||||
- name: build-push
|
||||
image: golang:1.17.3
|
||||
commands:
|
||||
- "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/arm/drone-docker ./cmd/drone-docker"
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GO111MODULE: on
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- tag
|
||||
|
||||
- name: build-tag
|
||||
image: golang:1.17.3
|
||||
commands:
|
||||
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm/drone-docker ./cmd/drone-docker"
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GO111MODULE: on
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
|
||||
- name: executable
|
||||
image: golang:1.17.3
|
||||
commands:
|
||||
- ./release/linux/arm/drone-docker --help
|
||||
|
||||
- name: publish
|
||||
image: plugins/docker:18
|
||||
settings:
|
||||
auto_tag: true
|
||||
auto_tag_suffix: linux-arm
|
||||
daemon_off: false
|
||||
dockerfile: docker/docker/Dockerfile.linux.arm
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: plugins/docker
|
||||
username:
|
||||
from_secret: docker_username
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- pull_request
|
||||
|
||||
trigger:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
- "refs/tags/**"
|
||||
- "refs/pull/**"
|
||||
|
||||
depends_on:
|
||||
- testing
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: notifications-docker
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
|
||||
steps:
|
||||
- name: manifest
|
||||
image: plugins/manifest
|
||||
settings:
|
||||
auto_tag: true
|
||||
ignore_missing: true
|
||||
password:
|
||||
from_secret: docker_password
|
||||
spec: docker/docker/manifest.tmpl
|
||||
username:
|
||||
from_secret: docker_username
|
||||
|
||||
trigger:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
- "refs/tags/**"
|
||||
|
||||
depends_on:
|
||||
- windows-1809-docker
|
||||
- windows-1909-docker
|
||||
- linux-amd64-docker
|
||||
- linux-arm64-docker
|
||||
- linux-arm-docker
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: linux-amd64-gcr
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
|
||||
steps:
|
||||
- name: build-push
|
||||
image: golang:1.17.3
|
||||
commands:
|
||||
- "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/amd64/drone-gcr ./cmd/drone-gcr"
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GO111MODULE: on
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- tag
|
||||
|
||||
- name: build-tag
|
||||
image: golang:1.17.3
|
||||
commands:
|
||||
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/amd64/drone-gcr ./cmd/drone-gcr"
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GO111MODULE: on
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
|
||||
- name: publish
|
||||
image: plugins/docker:18
|
||||
settings:
|
||||
auto_tag: true
|
||||
auto_tag_suffix: linux-amd64
|
||||
daemon_off: false
|
||||
dockerfile: docker/gcr/Dockerfile.linux.amd64
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: plugins/gcr
|
||||
username:
|
||||
from_secret: docker_username
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- pull_request
|
||||
|
||||
trigger:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
- "refs/tags/**"
|
||||
- "refs/pull/**"
|
||||
|
||||
depends_on:
|
||||
- linux-amd64-docker
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: linux-arm64-gcr
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: arm64
|
||||
|
||||
steps:
|
||||
- name: build-push
|
||||
image: golang:1.17.3
|
||||
commands:
|
||||
- "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/arm64/drone-gcr ./cmd/drone-gcr"
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GO111MODULE: on
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- tag
|
||||
|
||||
- name: build-tag
|
||||
image: golang:1.17.3
|
||||
commands:
|
||||
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm64/drone-gcr ./cmd/drone-gcr"
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GO111MODULE: on
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
|
||||
- name: publish
|
||||
image: plugins/docker:18
|
||||
settings:
|
||||
auto_tag: true
|
||||
auto_tag_suffix: linux-arm64
|
||||
daemon_off: false
|
||||
dockerfile: docker/gcr/Dockerfile.linux.arm64
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: plugins/gcr
|
||||
username:
|
||||
from_secret: docker_username
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- pull_request
|
||||
|
||||
trigger:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
- "refs/tags/**"
|
||||
- "refs/pull/**"
|
||||
|
||||
depends_on:
|
||||
- linux-arm64-docker
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: linux-arm-gcr
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: arm
|
||||
|
||||
steps:
|
||||
- name: build-push
|
||||
image: golang:1.17.3
|
||||
commands:
|
||||
- "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/arm/drone-gcr ./cmd/drone-gcr"
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GO111MODULE: on
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- tag
|
||||
|
||||
- name: build-tag
|
||||
image: golang:1.17.3
|
||||
commands:
|
||||
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm/drone-gcr ./cmd/drone-gcr"
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GO111MODULE: on
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
|
||||
- name: publish
|
||||
image: plugins/docker:18
|
||||
settings:
|
||||
auto_tag: true
|
||||
auto_tag_suffix: linux-arm
|
||||
daemon_off: false
|
||||
dockerfile: docker/gcr/Dockerfile.linux.arm
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: plugins/gcr
|
||||
username:
|
||||
from_secret: docker_username
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- pull_request
|
||||
|
||||
trigger:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
- "refs/tags/**"
|
||||
- "refs/pull/**"
|
||||
|
||||
depends_on:
|
||||
- linux-arm-docker
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: notifications-gcr
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
|
||||
steps:
|
||||
- name: manifest
|
||||
image: plugins/manifest
|
||||
settings:
|
||||
auto_tag: true
|
||||
ignore_missing: true
|
||||
password:
|
||||
from_secret: docker_password
|
||||
spec: docker/gcr/manifest.tmpl
|
||||
username:
|
||||
from_secret: docker_username
|
||||
|
||||
trigger:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
- "refs/tags/**"
|
||||
|
||||
depends_on:
|
||||
- windows-1809-gcr
|
||||
- windows-1909-gcr
|
||||
- linux-amd64-gcr
|
||||
- linux-arm64-gcr
|
||||
- linux-arm-gcr
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: linux-amd64-ecr
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
|
||||
steps:
|
||||
- name: build-push
|
||||
image: golang:1.17.3
|
||||
commands:
|
||||
- "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/amd64/drone-ecr ./cmd/drone-ecr"
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GO111MODULE: on
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- tag
|
||||
|
||||
- name: build-tag
|
||||
image: golang:1.17.3
|
||||
commands:
|
||||
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/amd64/drone-ecr ./cmd/drone-ecr"
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GO111MODULE: on
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
|
||||
- name: publish
|
||||
image: plugins/docker:18
|
||||
settings:
|
||||
auto_tag: true
|
||||
auto_tag_suffix: linux-amd64
|
||||
daemon_off: false
|
||||
dockerfile: docker/ecr/Dockerfile.linux.amd64
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: plugins/ecr
|
||||
username:
|
||||
from_secret: docker_username
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- pull_request
|
||||
|
||||
trigger:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
- "refs/tags/**"
|
||||
- "refs/pull/**"
|
||||
|
||||
depends_on:
|
||||
- linux-amd64-docker
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: linux-arm64-ecr
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: arm64
|
||||
|
||||
steps:
|
||||
- name: build-push
|
||||
image: golang:1.17.3
|
||||
commands:
|
||||
- "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/arm64/drone-ecr ./cmd/drone-ecr"
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GO111MODULE: on
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- tag
|
||||
|
||||
- name: build-tag
|
||||
image: golang:1.17.3
|
||||
commands:
|
||||
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm64/drone-ecr ./cmd/drone-ecr"
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GO111MODULE: on
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
|
||||
- name: publish
|
||||
image: plugins/docker:18
|
||||
settings:
|
||||
auto_tag: true
|
||||
auto_tag_suffix: linux-arm64
|
||||
daemon_off: false
|
||||
dockerfile: docker/ecr/Dockerfile.linux.arm64
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: plugins/ecr
|
||||
username:
|
||||
from_secret: docker_username
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- pull_request
|
||||
|
||||
trigger:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
- "refs/tags/**"
|
||||
- "refs/pull/**"
|
||||
|
||||
depends_on:
|
||||
- linux-arm64-docker
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: linux-arm-ecr
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: arm
|
||||
|
||||
steps:
|
||||
- name: build-push
|
||||
image: golang:1.17.3
|
||||
commands:
|
||||
- "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/arm/drone-ecr ./cmd/drone-ecr"
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GO111MODULE: on
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- tag
|
||||
|
||||
- name: build-tag
|
||||
image: golang:1.17.3
|
||||
commands:
|
||||
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm/drone-ecr ./cmd/drone-ecr"
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GO111MODULE: on
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
|
||||
- name: publish
|
||||
image: plugins/docker:18
|
||||
settings:
|
||||
auto_tag: true
|
||||
auto_tag_suffix: linux-arm
|
||||
daemon_off: false
|
||||
dockerfile: docker/ecr/Dockerfile.linux.arm
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: plugins/ecr
|
||||
username:
|
||||
from_secret: docker_username
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- pull_request
|
||||
|
||||
trigger:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
- "refs/tags/**"
|
||||
- "refs/pull/**"
|
||||
|
||||
depends_on:
|
||||
- linux-arm-docker
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: notifications-ecr
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
|
||||
steps:
|
||||
- name: manifest
|
||||
image: plugins/manifest
|
||||
settings:
|
||||
auto_tag: true
|
||||
ignore_missing: true
|
||||
password:
|
||||
from_secret: docker_password
|
||||
spec: docker/ecr/manifest.tmpl
|
||||
username:
|
||||
from_secret: docker_username
|
||||
|
||||
trigger:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
- "refs/tags/**"
|
||||
|
||||
depends_on:
|
||||
- windows-1809-ecr
|
||||
- windows-1909-ecr
|
||||
- linux-amd64-ecr
|
||||
- linux-arm64-ecr
|
||||
- linux-arm-ecr
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: linux-amd64-heroku
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
|
||||
steps:
|
||||
- name: build-push
|
||||
image: golang:1.17.3
|
||||
commands:
|
||||
- "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/amd64/drone-heroku ./cmd/drone-heroku"
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GO111MODULE: on
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- tag
|
||||
|
||||
- name: build-tag
|
||||
image: golang:1.17.3
|
||||
commands:
|
||||
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/amd64/drone-heroku ./cmd/drone-heroku"
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GO111MODULE: on
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
|
||||
- name: publish
|
||||
image: plugins/docker:18
|
||||
settings:
|
||||
auto_tag: true
|
||||
auto_tag_suffix: linux-amd64
|
||||
daemon_off: false
|
||||
dockerfile: docker/heroku/Dockerfile.linux.amd64
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: plugins/heroku
|
||||
username:
|
||||
from_secret: docker_username
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- pull_request
|
||||
|
||||
trigger:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
- "refs/tags/**"
|
||||
- "refs/pull/**"
|
||||
|
||||
depends_on:
|
||||
- linux-amd64-docker
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: linux-arm64-heroku
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: arm64
|
||||
|
||||
steps:
|
||||
- name: build-push
|
||||
image: golang:1.17.3
|
||||
commands:
|
||||
- "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/arm64/drone-heroku ./cmd/drone-heroku"
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GO111MODULE: on
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- tag
|
||||
|
||||
- name: build-tag
|
||||
image: golang:1.17.3
|
||||
commands:
|
||||
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm64/drone-heroku ./cmd/drone-heroku"
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GO111MODULE: on
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
|
||||
- name: publish
|
||||
image: plugins/docker:18
|
||||
settings:
|
||||
auto_tag: true
|
||||
auto_tag_suffix: linux-arm64
|
||||
daemon_off: false
|
||||
dockerfile: docker/heroku/Dockerfile.linux.arm64
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: plugins/heroku
|
||||
username:
|
||||
from_secret: docker_username
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- pull_request
|
||||
|
||||
trigger:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
- "refs/tags/**"
|
||||
- "refs/pull/**"
|
||||
|
||||
depends_on:
|
||||
- linux-arm64-docker
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: linux-arm-heroku
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: arm
|
||||
|
||||
steps:
|
||||
- name: build-push
|
||||
image: golang:1.17.3
|
||||
commands:
|
||||
- "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/arm/drone-heroku ./cmd/drone-heroku"
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GO111MODULE: on
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- tag
|
||||
|
||||
- name: build-tag
|
||||
image: golang:1.17.3
|
||||
commands:
|
||||
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm/drone-heroku ./cmd/drone-heroku"
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GO111MODULE: on
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
|
||||
- name: publish
|
||||
image: plugins/docker:18
|
||||
settings:
|
||||
auto_tag: true
|
||||
auto_tag_suffix: linux-arm
|
||||
daemon_off: false
|
||||
dockerfile: docker/heroku/Dockerfile.linux.arm
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: plugins/heroku
|
||||
username:
|
||||
from_secret: docker_username
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- pull_request
|
||||
|
||||
trigger:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
- "refs/tags/**"
|
||||
- "refs/pull/**"
|
||||
|
||||
depends_on:
|
||||
- linux-arm-docker
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: notifications-heroku
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
|
||||
steps:
|
||||
- name: manifest
|
||||
image: plugins/manifest
|
||||
settings:
|
||||
auto_tag: true
|
||||
ignore_missing: true
|
||||
password:
|
||||
from_secret: docker_password
|
||||
spec: docker/heroku/manifest.tmpl
|
||||
username:
|
||||
from_secret: docker_username
|
||||
|
||||
trigger:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
- "refs/tags/**"
|
||||
|
||||
depends_on:
|
||||
- linux-amd64-heroku
|
||||
- linux-arm64-heroku
|
||||
- linux-arm-heroku
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: linux-amd64-acr
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
|
||||
steps:
|
||||
- name: build-push
|
||||
image: golang:1.17.3
|
||||
commands:
|
||||
- "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/amd64/drone-acr ./cmd/drone-acr"
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GO111MODULE: on
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- tag
|
||||
|
||||
- name: build-tag
|
||||
image: golang:1.17.3
|
||||
commands:
|
||||
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/amd64/drone-acr ./cmd/drone-acr"
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GO111MODULE: on
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
|
||||
- name: publish
|
||||
image: plugins/docker:18
|
||||
settings:
|
||||
auto_tag: true
|
||||
auto_tag_suffix: linux-amd64
|
||||
daemon_off: false
|
||||
dockerfile: docker/acr/Dockerfile.linux.amd64
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: plugins/acr
|
||||
username:
|
||||
from_secret: docker_username
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- pull_request
|
||||
|
||||
trigger:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
- "refs/tags/**"
|
||||
- "refs/pull/**"
|
||||
|
||||
depends_on:
|
||||
- linux-amd64-docker
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: linux-arm64-acr
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: arm64
|
||||
|
||||
steps:
|
||||
- name: build-push
|
||||
image: golang:1.17.3
|
||||
commands:
|
||||
- "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/arm64/drone-acr ./cmd/drone-acr"
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GO111MODULE: on
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- tag
|
||||
|
||||
- name: build-tag
|
||||
image: golang:1.17.3
|
||||
commands:
|
||||
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/arm64/drone-acr ./cmd/drone-acr"
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GO111MODULE: on
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
|
||||
- name: publish
|
||||
image: plugins/docker:18
|
||||
settings:
|
||||
auto_tag: true
|
||||
auto_tag_suffix: linux-arm64
|
||||
daemon_off: false
|
||||
dockerfile: docker/acr/Dockerfile.linux.arm64
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: plugins/acr
|
||||
username:
|
||||
from_secret: docker_username
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- pull_request
|
||||
|
||||
trigger:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
- "refs/tags/**"
|
||||
- "refs/pull/**"
|
||||
|
||||
depends_on:
|
||||
- linux-arm64-docker
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: linux-arm-acr
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: arm
|
||||
|
||||
steps:
|
||||
- name: build-push
|
||||
image: golang:1.17.3
|
||||
commands:
|
||||
- "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/arm/drone-acr ./cmd/drone-acr"
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GO111MODULE: on
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- tag
|
||||
|
||||
- name: build-tag
|
||||
image: golang:1.17.3
|
||||
commands:
|
||||
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/arm/drone-acr ./cmd/drone-acr"
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GO111MODULE: on
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
|
||||
- name: publish
|
||||
image: plugins/docker:18
|
||||
settings:
|
||||
auto_tag: true
|
||||
auto_tag_suffix: linux-arm
|
||||
daemon_off: false
|
||||
dockerfile: docker/acr/Dockerfile.linux.arm
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: plugins/acr
|
||||
username:
|
||||
from_secret: docker_username
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- pull_request
|
||||
|
||||
trigger:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
- "refs/tags/**"
|
||||
- "refs/pull/**"
|
||||
|
||||
depends_on:
|
||||
- linux-arm-docker
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: notifications-acr
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
|
||||
steps:
|
||||
- name: manifest
|
||||
image: plugins/manifest
|
||||
settings:
|
||||
ignore_missing: true
|
||||
password:
|
||||
from_secret: docker_password
|
||||
spec: docker/acr/manifest.tmpl
|
||||
username:
|
||||
from_secret: docker_username
|
||||
|
||||
trigger:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
- "refs/tags/**"
|
||||
|
||||
depends_on:
|
||||
- windows-1809-acr
|
||||
- windows-1909-acr
|
||||
- linux-amd64-acr
|
||||
- linux-arm64-acr
|
||||
- linux-arm-acr
|
||||
|
||||
...
|
||||
|
@ -53,8 +53,11 @@
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
- \(maint\) bump git to 1.13 for build and test [\#338](https://github.com/drone-plugins/drone-docker/pull/338) ([tphoney](https://github.com/tphoney))
|
||||
- \(maint\) v19.03.9 release prep [\#337](https://github.com/drone-plugins/drone-docker/pull/337) ([tphoney](https://github.com/tphoney))
|
||||
>>>>>>> upstream/master
|
||||
- \(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))
|
||||
|
||||
|
21
card.go
21
card.go
@ -8,6 +8,8 @@ import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/drone/drone-go/drone"
|
||||
@ -36,7 +38,9 @@ func (p Plugin) writeCard() error {
|
||||
for _, tag := range inspect.RepoTags {
|
||||
sliceTagStruct = append(sliceTagStruct, TagStruct{Tag: tag})
|
||||
}
|
||||
inspect.ParsedRepoTags = sliceTagStruct
|
||||
inspect.ParsedRepoTags = sliceTagStruct[1:] // remove the first tag which is always "hash:latest"
|
||||
// create the url from repo and registry
|
||||
inspect.URL = mapRegistryToURL(p.Daemon.Registry, p.Build.Repo)
|
||||
cardData, _ := json.Marshal(inspect)
|
||||
|
||||
card := drone.CardInput{
|
||||
@ -67,3 +71,18 @@ func writeCardTo(out io.Writer, data []byte) {
|
||||
io.WriteString(out, "\u001B]0m")
|
||||
io.WriteString(out, "\n")
|
||||
}
|
||||
|
||||
func mapRegistryToURL(registry, repo string) (url string) {
|
||||
url = "https://"
|
||||
var domain string
|
||||
if strings.Contains(registry, "amazonaws.com") {
|
||||
domain = "gallery.ecr.aws/"
|
||||
} else if strings.Contains(registry, "gcr.io") {
|
||||
domain = "console.cloud.google.com/gcr/images"
|
||||
} else {
|
||||
// default to docker hub
|
||||
domain = "hub.docker.com/r/"
|
||||
}
|
||||
url = path.Join(url, domain, repo)
|
||||
return url
|
||||
}
|
||||
|
@ -94,6 +94,7 @@ type (
|
||||
SizeString string
|
||||
VirtualSizeString string
|
||||
Time string
|
||||
URL string `json:"URL"`
|
||||
}
|
||||
TagStruct struct {
|
||||
Tag string `json:"Tag"`
|
||||
@ -137,10 +138,10 @@ func (p Plugin) Exec() error {
|
||||
|
||||
// create Auth Config File
|
||||
if p.Login.Config != "" {
|
||||
os.MkdirAll(dockerHome, 0600)
|
||||
os.MkdirAll(dockerHome, 0o600)
|
||||
|
||||
path := filepath.Join(dockerHome, "config.json")
|
||||
err := ioutil.WriteFile(path, []byte(p.Login.Config), 0600)
|
||||
err := ioutil.WriteFile(path, []byte(p.Login.Config), 0o600)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Error writing config.json: %s", err)
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM docker:20.10.9-dind
|
||||
FROM docker:20.11.11-dind
|
||||
|
||||
ENV DOCKER_HOST=unix:///var/run/docker.sock
|
||||
|
||||
|
@ -36,5 +36,6 @@
|
||||
},
|
||||
"SizeString": "13.40MB",
|
||||
"VirtualSizeString": "13.40MB",
|
||||
"Time": "2022-02-16T11:13:40Z"
|
||||
"Time": "2022-02-16T11:13:40Z",
|
||||
"URL": "http://hub.docker.com/repositories/tphoney/test/"
|
||||
}
|
@ -61,12 +61,15 @@
|
||||
"type": "FactSet",
|
||||
"facts": [
|
||||
{
|
||||
"title": "-",
|
||||
"value": "${Tag}"
|
||||
"title": "${Tag}",
|
||||
"value": ""
|
||||
}
|
||||
],
|
||||
"spacing": "Small",
|
||||
"$data": "${ParsedRepoTags}"
|
||||
"$data": "${ParsedRepoTags}",
|
||||
"wrap": true,
|
||||
"size": "Small",
|
||||
"weight": "Bolder"
|
||||
}
|
||||
],
|
||||
"separator": true,
|
||||
@ -88,7 +91,6 @@
|
||||
"spacing": "Small",
|
||||
"text": "${SizeString}",
|
||||
"wrap": true,
|
||||
"size": "Small",
|
||||
"weight": "Bolder"
|
||||
}
|
||||
],
|
||||
@ -112,7 +114,6 @@
|
||||
"spacing": "Small",
|
||||
"text": "{{DATE(${Time})}} - {{TIME(${Time})}}",
|
||||
"wrap": true,
|
||||
"size": "Small",
|
||||
"weight": "Bolder"
|
||||
}
|
||||
],
|
||||
@ -125,6 +126,13 @@
|
||||
"separator": true
|
||||
}
|
||||
],
|
||||
"actions": [
|
||||
{
|
||||
"type": "Action.OpenUrl",
|
||||
"title": "Go to image",
|
||||
"url": "${url}"
|
||||
}
|
||||
],
|
||||
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
|
||||
"version": "1.5"
|
||||
}
|
1
go.mod
1
go.mod
@ -18,6 +18,7 @@ require (
|
||||
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
|
||||
gopkg.in/yaml.v2 v2.2.8 // indirect
|
||||
)
|
||||
|
||||
go 1.17
|
||||
|
3
go.sum
3
go.sum
@ -38,5 +38,6 @@ golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnf
|
||||
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=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
|
||||
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
|
Loading…
Reference in New Issue
Block a user