Files
drone-docker/.drone.yml
2020-10-15 10:21:06 -07:00

588 lines
11 KiB
YAML

---
kind: pipeline
type: docker
name: testing
platform:
os: linux
arch: amd64
steps:
- name: staticcheck
pull: always
image: golang:1.15
commands:
- go run honnef.co/go/tools/cmd/staticcheck ./...
volumes:
- name: gopath
path: /go
- name: lint
pull: always
image: golang:1.15
commands:
- go run golang.org/x/lint/golint -set_exit_status ./...
volumes:
- name: gopath
path: /go
- name: vet
image: golang:1.15
commands:
- go vet ./...
volumes:
- name: gopath
path: /go
- name: test
image: golang:1.15
commands:
- go test -cover ./...
volumes:
- name: gopath
path: /go
volumes:
- name: gopath
temp: {}
trigger:
ref:
- refs/heads/master
- refs/tags/**
- refs/pull/**
---
kind: pipeline
type: docker
name: linux-amd64
platform:
os: linux
arch: amd64
steps:
- name: environment
pull: always
image: golang:1.15
commands:
- go version
- go env
environment:
CGO_ENABLED: 0
- name: build-docker
image: golang:1.15
commands:
- go build -v -ldflags "-X main.version=" -a -tags netgo -o release/linux/amd64/drone-docker ./cmd/drone-docker
environment:
CGO_ENABLED: 0
- name: docker-docker
pull: always
image: plugins/docker
settings:
auto_tag: true
auto_tag_suffix: linux-amd64
dockerfile: docker/docker/Dockerfile.linux.amd64
password:
from_secret: docker_password
repo: plugins/docker
username:
from_secret: docker_username
- name: build-acr
image: golang:1.15
commands:
- go build -v -ldflags "-X main.version=" -a -tags netgo -o release/linux/amd64/drone-acr ./cmd/drone-acr
environment:
CGO_ENABLED: 0
- name: docker-acr
pull: always
image: plugins/docker
settings:
auto_tag: true
auto_tag_suffix: linux-amd64
dockerfile: docker/acr/Dockerfile.linux.amd64
password:
from_secret: docker_password
repo: plugins/acr
username:
from_secret: docker_username
- name: build-ecr
image: golang:1.15
commands:
- go build -v -ldflags "-X main.version=" -a -tags netgo -o release/linux/amd64/drone-ecr ./cmd/drone-ecr
environment:
CGO_ENABLED: 0
- name: docker-ecr
pull: always
image: plugins/docker
settings:
auto_tag: true
auto_tag_suffix: linux-amd64
dockerfile: docker/ecr/Dockerfile.linux.amd64
password:
from_secret: docker_password
repo: plugins/ecr
username:
from_secret: docker_username
- name: build-gcr
image: golang:1.15
commands:
- go build -v -ldflags "-X main.version=" -a -tags netgo -o release/linux/amd64/drone-gcr ./cmd/drone-gcr
environment:
CGO_ENABLED: 0
- name: docker-gcr
pull: always
image: plugins/docker
settings:
auto_tag: true
auto_tag_suffix: linux-amd64
dockerfile: docker/gcr/Dockerfile.linux.amd64
password:
from_secret: docker_password
repo: plugins/gcr
username:
from_secret: docker_username
- name: build-heroku
image: golang:1.15
commands:
- go build -v -ldflags "-X main.version=" -a -tags netgo -o release/linux/amd64/drone-heroku ./cmd/drone-heroku
environment:
CGO_ENABLED: 0
- name: docker-heroku
pull: always
image: plugins/docker
settings:
auto_tag: true
auto_tag_suffix: linux-amd64
dockerfile: docker/heroku/Dockerfile.linux.amd64
password:
from_secret: docker_password
repo: plugins/heroku
username:
from_secret: docker_username
trigger:
ref:
- refs/heads/master
- refs/tags/**
- refs/pull/**
depends_on:
- testing
---
kind: pipeline
type: docker
name: linux-arm64
platform:
os: linux
arch: arm64
steps:
- name: environment
pull: always
image: golang:1.15
commands:
- go version
- go env
environment:
CGO_ENABLED: 0
- name: build-docker
image: golang:1.15
commands:
- go build -v -ldflags "-X main.version=" -a -tags netgo -o release/linux/arm64/drone-docker ./cmd/drone-docker
environment:
CGO_ENABLED: 0
- name: docker-docker
pull: always
image: plugins/docker
settings:
auto_tag: true
auto_tag_suffix: linux-arm64
dockerfile: docker/docker/Dockerfile.linux.arm64
password:
from_secret: docker_password
repo: plugins/docker
username:
from_secret: docker_username
- name: build-acr
image: golang:1.15
commands:
- go build -v -ldflags "-X main.version=" -a -tags netgo -o release/linux/arm64/drone-acr ./cmd/drone-acr
environment:
CGO_ENABLED: 0
- name: docker-acr
pull: always
image: plugins/docker
settings:
auto_tag: true
auto_tag_suffix: linux-arm64
dockerfile: docker/acr/Dockerfile.linux.arm64
password:
from_secret: docker_password
repo: plugins/acr
username:
from_secret: docker_username
- name: build-ecr
image: golang:1.15
commands:
- go build -v -ldflags "-X main.version=" -a -tags netgo -o release/linux/arm64/drone-ecr ./cmd/drone-ecr
environment:
CGO_ENABLED: 0
- name: docker-ecr
pull: always
image: plugins/docker
settings:
auto_tag: true
auto_tag_suffix: linux-arm64
dockerfile: docker/ecr/Dockerfile.linux.arm64
password:
from_secret: docker_password
repo: plugins/ecr
username:
from_secret: docker_username
- name: build-gcr
image: golang:1.15
commands:
- go build -v -ldflags "-X main.version=" -a -tags netgo -o release/linux/arm64/drone-gcr ./cmd/drone-gcr
environment:
CGO_ENABLED: 0
- name: docker-gcr
pull: always
image: plugins/docker
settings:
auto_tag: true
auto_tag_suffix: linux-arm64
dockerfile: docker/gcr/Dockerfile.linux.arm64
password:
from_secret: docker_password
repo: plugins/gcr
username:
from_secret: docker_username
- name: build-heroku
image: golang:1.15
commands:
- go build -v -ldflags "-X main.version=" -a -tags netgo -o release/linux/arm64/drone-heroku ./cmd/drone-heroku
environment:
CGO_ENABLED: 0
- name: docker-heroku
pull: always
image: plugins/docker
settings:
auto_tag: true
auto_tag_suffix: linux-arm64
dockerfile: docker/heroku/Dockerfile.linux.arm64
password:
from_secret: docker_password
repo: plugins/heroku
username:
from_secret: docker_username
trigger:
ref:
- refs/heads/master
- refs/tags/**
- refs/pull/**
depends_on:
- testing
---
kind: pipeline
type: docker
name: linux-arm
platform:
os: linux
arch: arm
steps:
- name: environment
pull: always
image: golang:1.15
commands:
- go version
- go env
environment:
CGO_ENABLED: 0
- name: build-docker
image: golang:1.15
commands:
- go build -v -ldflags "-X main.version=" -a -tags netgo -o release/linux/arm/drone-docker ./cmd/drone-docker
environment:
CGO_ENABLED: 0
- name: docker-docker
pull: always
image: plugins/docker
settings:
auto_tag: true
auto_tag_suffix: linux-arm
dockerfile: docker/docker/Dockerfile.linux.arm
password:
from_secret: docker_password
repo: plugins/docker
username:
from_secret: docker_username
- name: build-acr
image: golang:1.15
commands:
- go build -v -ldflags "-X main.version=" -a -tags netgo -o release/linux/arm/drone-acr ./cmd/drone-acr
environment:
CGO_ENABLED: 0
- name: docker-acr
pull: always
image: plugins/docker
settings:
auto_tag: true
auto_tag_suffix: linux-arm
dockerfile: docker/acr/Dockerfile.linux.arm
password:
from_secret: docker_password
repo: plugins/acr
username:
from_secret: docker_username
- name: build-ecr
image: golang:1.15
commands:
- go build -v -ldflags "-X main.version=" -a -tags netgo -o release/linux/arm/drone-ecr ./cmd/drone-ecr
environment:
CGO_ENABLED: 0
- name: docker-ecr
pull: always
image: plugins/docker
settings:
auto_tag: true
auto_tag_suffix: linux-arm
dockerfile: docker/ecr/Dockerfile.linux.arm
password:
from_secret: docker_password
repo: plugins/ecr
username:
from_secret: docker_username
- name: build-gcr
image: golang:1.15
commands:
- go build -v -ldflags "-X main.version=" -a -tags netgo -o release/linux/arm/drone-gcr ./cmd/drone-gcr
environment:
CGO_ENABLED: 0
- name: docker-gcr
pull: always
image: plugins/docker
settings:
auto_tag: true
auto_tag_suffix: linux-arm
dockerfile: docker/gcr/Dockerfile.linux.arm
password:
from_secret: docker_password
repo: plugins/gcr
username:
from_secret: docker_username
- name: build-heroku
image: golang:1.15
commands:
- go build -v -ldflags "-X main.version=" -a -tags netgo -o release/linux/arm/drone-heroku ./cmd/drone-heroku
environment:
CGO_ENABLED: 0
- name: docker-heroku
pull: always
image: plugins/docker
settings:
auto_tag: true
auto_tag_suffix: linux-arm
dockerfile: docker/heroku/Dockerfile.linux.arm
password:
from_secret: docker_password
repo: plugins/heroku
username:
from_secret: docker_username
trigger:
ref:
- refs/heads/master
- refs/tags/**
- refs/pull/**
depends_on:
- testing
---
kind: pipeline
type: docker
name: manifest
platform:
os: linux
arch: amd64
steps:
- name: manifest-docker
pull: always
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
- name: microbadger-docker
pull: always
image: plugins/webhook
settings:
urls:
from_secret: microbadger_url
- name: manifest-acr
pull: always
image: plugins/manifest
settings:
auto_tag: true
ignore_missing: true
password:
from_secret: docker_password
spec: docker/acr/manifest.tmpl
username:
from_secret: docker_username
- name: microbadger-acr
pull: always
image: plugins/webhook
settings:
urls:
from_secret: microbadger_url
- name: manifest-ecr
pull: always
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
- name: microbadger-ecr
pull: always
image: plugins/webhook
settings:
urls:
from_secret: microbadger_url
- name: manifest-gcr
pull: always
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
- name: microbadger-gcr
pull: always
image: plugins/webhook
settings:
urls:
from_secret: microbadger_url
- name: manifest-heroku
pull: always
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
- name: microbadger-heroku
pull: always
image: plugins/webhook
settings:
urls:
from_secret: microbadger_url
trigger:
ref:
- refs/heads/master
- refs/tags/**
depends_on:
- linux-amd64
- linux-arm64
- linux-arm
---
kind: pipeline
type: docker
name: gitter
platform:
os: linux
arch: amd64
clone:
disable: true
steps:
- name: gitter
pull: always
image: plugins/gitter
settings:
webhook:
from_secret: gitter_webhook
trigger:
ref:
- refs/heads/master
- refs/tags/**
status:
- failure
depends_on:
- manifest
- linux-amd64
- linux-arm64
- linux-arm
...