ci-3011- split out gar/gcr (#415)

* split out gar/gcr
This commit is contained in:
Eoin McAfee
2023-10-26 11:41:06 +01:00
committed by GitHub
parent 757a756d1a
commit 755ae001f9
10 changed files with 484 additions and 84 deletions
+183 -3
View File
@@ -63,6 +63,8 @@ steps:
- go build -o release/windows/amd64/drone-ecr.exe ./cmd/drone-ecr
- go build -o release/windows/amd64/drone-gcr.exe ./cmd/drone-gcr
- go build -o release/windows/amd64/drone-acr.exe ./cmd/drone-acr
- go build -o release/windows/amd64/drone-gcr.exe ./cmd/drone-gar
- name: build docker plugin
image: plugins/docker@sha256:f0233d950ae87ee6cb5500b2d5497fe02aa338201c0bdce2619f443fd174cfa4
settings:
@@ -123,7 +125,21 @@ steps:
purge: false
when:
event: [push, tag]
- name: build gar plugin
image: plugins/docker@sha256:f0233d950ae87ee6cb5500b2d5497fe02aa338201c0bdce2619f443fd174cfa4
pull: never
settings:
dockerfile: docker/gar/Dockerfile.windows.amd64.1809
repo: plugins/gar
username:
from_secret: docker_username
password:
from_secret: docker_password
auto_tag: true
auto_tag_suffix: windows-1809-amd64
purge: false
when:
event: [push, tag]
depends_on:
- testing
@@ -154,6 +170,7 @@ steps:
- go build -o release/windows/amd64/drone-ecr.exe ./cmd/drone-ecr
- go build -o release/windows/amd64/drone-gcr.exe ./cmd/drone-gcr
- go build -o release/windows/amd64/drone-acr.exe ./cmd/drone-acr
- go build -o release/windows/amd64/drone-gcr.exe ./cmd/drone-gar
- name: build docker plugin
image: plugins/docker
settings:
@@ -210,7 +227,20 @@ steps:
purge: false
when:
event: [push, tag]
- name: build gar plugin
image: plugins/docker
settings:
dockerfile: docker/gar/Dockerfile.windows.amd64.ltsc2022
repo: plugins/gar
username:
from_secret: docker_username
password:
from_secret: docker_password
auto_tag: true
auto_tag_suffix: windows-ltsc2022-amd64
purge: false
when:
event: [push, tag]
depends_on:
- testing
@@ -444,7 +474,6 @@ trigger:
depends_on:
- linux-amd64-docker
---
kind: pipeline
name: linux-arm64-gcr
@@ -539,7 +568,158 @@ depends_on:
- windows-ltsc2022
- linux-amd64-gcr
- linux-arm64-gcr
---
kind: pipeline
name: linux-amd64-gar
type: vm
pool:
use: ubuntu
platform:
os: linux
arch: amd64
steps:
- name: build-push
image: golang:1.21
commands:
- 'go build -v -ldflags "-X main.version=${DRONE_COMMIT_SHA:0:8}" -a -tags netgo -o release/linux/amd64/drone-gar ./cmd/drone-gar'
environment:
CGO_ENABLED: 0
when:
event:
exclude:
- tag
- name: build-tag
image: golang:1.21
commands:
- 'go build -v -ldflags "-X main.version=${DRONE_TAG##v}" -a -tags netgo -o release/linux/amd64/drone-gar ./cmd/drone-gar'
environment:
CGO_ENABLED: 0
when:
event:
- tag
- name: publish
image: plugins/docker:18
settings:
auto_tag: true
auto_tag_suffix: linux-amd64
daemon_off: false
dockerfile: docker/gar/Dockerfile.linux.amd64
password:
from_secret: docker_password
repo: plugins/gar
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-gar
type: vm
pool:
use: ubuntu_arm64
platform:
os: linux
arch: arm64
steps:
- name: build-push
image: golang:1.21
commands:
- 'go build -v -ldflags "-X main.version=${DRONE_COMMIT_SHA:0:8}" -a -tags netgo -o release/linux/arm64/drone-gar ./cmd/drone-gar'
environment:
CGO_ENABLED: 0
when:
event:
exclude:
- tag
- name: build-tag
image: golang:1.21
commands:
- 'go build -v -ldflags "-X main.version=${DRONE_TAG##v}" -a -tags netgo -o release/linux/arm64/drone-gar ./cmd/drone-gar'
environment:
CGO_ENABLED: 0
when:
event:
- tag
- name: publish
image: plugins/docker:18
settings:
auto_tag: true
auto_tag_suffix: linux-arm64
daemon_off: false
dockerfile: docker/gar/Dockerfile.linux.arm64
password:
from_secret: docker_password
repo: plugins/gar
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: notifications-gar
type: vm
pool:
use: ubuntu
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/gar/manifest.tmpl
username:
from_secret: docker_username
trigger:
ref:
- refs/heads/master
- "refs/tags/**"
depends_on:
- windows-1809
- windows-ltsc2022
- linux-amd64-gar
- linux-arm64-gar
---
kind: pipeline
name: linux-amd64-ecr