drone-docker/.drone.windows.yml
2019-01-21 21:50:30 +01:00

245 lines
5.2 KiB
YAML

---
kind: pipeline
name: linux-amd64
platform:
os: linux
arch: amd64
steps:
- name: build-docker
pull: always
image: golang:1.11
commands:
- "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/amd64/drone-docker ./cmd/drone-docker"
environment:
CGO_ENABLED: 0
GO111MODULE: on
when:
event:
- push
- pull_request
- name: build-docker
pull: always
image: golang:1.11
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-docker ./cmd/drone-docker"
environment:
CGO_ENABLED: 0
GO111MODULE: on
when:
event:
- tag
- name: dryrun-docker
pull: always
image: plugins/docker:linux-amd64
settings:
dockerfile: docker/docker/Dockerfile.linux.amd64
dry_run: true
password:
from_secret: docker_password
repo: plugins/docker
tags: linux-amd64
username:
from_secret: docker_username
when:
event:
- pull_request
- name: publish-docker
pull: always
image: plugins/docker:linux-amd64
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
when:
event:
- push
- tag
- name: build-heroku
pull: always
image: golang:1.11
commands:
- "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/amd64/drone-heroku ./cmd/drone-heroku"
environment:
CGO_ENABLED: 0
GO111MODULE: on
when:
event:
- push
- pull_request
- name: build-heroku
pull: always
image: golang:1.11
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-heroku ./cmd/drone-heroku"
environment:
CGO_ENABLED: 0
GO111MODULE: on
when:
event:
- tag
- name: dryrun-heroku
pull: always
image: plugins/docker:linux-amd64
settings:
dry_run: true
herokufile: docker/heroku/Dockerfile.linux.amd64
password:
from_secret: heroku_password
repo: plugins/heroku
tags: linux-amd64
username:
from_secret: heroku_username
when:
event:
- pull_request
- name: publish-heroku
pull: always
image: plugins/docker:linux-amd64
settings:
auto_tag: true
auto_tag_suffix: linux-amd64
herokufile: docker/heroku/Dockerfile.linux.amd64
password:
from_secret: heroku_password
repo: plugins/heroku
username:
from_secret: heroku_username
when:
event:
- push
- tag
- name: build-gcr
pull: always
image: golang:1.11
commands:
- "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/amd64/drone-gcr ./cmd/drone-gcr"
environment:
CGO_ENABLED: 0
GO111MODULE: on
when:
event:
- push
- pull_request
- name: build-gcr
pull: always
image: golang:1.11
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-gcr ./cmd/drone-gcr"
environment:
CGO_ENABLED: 0
GO111MODULE: on
when:
event:
- tag
- name: dryrun-gcr
pull: always
image: plugins/docker:linux-amd64
settings:
dry_run: true
gcrfile: docker/gcr/Dockerfile.linux.amd64
password:
from_secret: gcr_password
repo: plugins/gcr
tags: linux-amd64
username:
from_secret: gcr_username
when:
event:
- pull_request
- name: publish-gcr
pull: always
image: plugins/docker:linux-amd64
settings:
auto_tag: true
auto_tag_suffix: linux-amd64
gcrfile: docker/gcr/Dockerfile.linux.amd64
password:
from_secret: gcr_password
repo: plugins/gcr
username:
from_secret: gcr_username
when:
event:
- push
- tag
- name: build-ecr
pull: always
image: golang:1.11
commands:
- "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/amd64/drone-ecr ./cmd/drone-ecr"
environment:
CGO_ENABLED: 0
GO111MODULE: on
when:
event:
- push
- pull_request
- name: build-ecr
pull: always
image: golang:1.11
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-ecr ./cmd/drone-ecr"
environment:
CGO_ENABLED: 0
GO111MODULE: on
when:
event:
- tag
- name: dryrun-ecr
pull: always
image: plugins/docker:linux-amd64
settings:
dockerfile: docker/ecr/Dockerfile.linux.amd64
dry_run: true
password:
from_secret: ecr_password
repo: plugins/ecr
tags: linux-amd64
username:
from_secret: ecr_username
when:
event:
- pull_request
- name: publish-ecr
pull: always
image: plugins/docker:linux-amd64
settings:
auto_tag: true
auto_tag_suffix: linux-amd64
dockerfile: docker/ecr/Dockerfile.linux.amd64
password:
from_secret: ecr_password
repo: plugins/ecr
username:
from_secret: ecr_username
when:
event:
- push
- tag
trigger:
branch:
- master