git-docker/.drone.yml
2019-08-04 22:26:47 -07:00

154 lines
2.3 KiB
YAML

---
kind: pipeline
name: linux-amd64
platform:
os: linux
arch: amd64
steps:
- name: test
image: golang:1.10
commands:
- cd posix
- tar -xf fixtures.tar -C /
- go test -v
- name: push
image: plugins/docker
settings:
auto_tag: true
auto_tag_suffix: linux-amd64
dockerfile: docker/Dockerfile.linux.amd64
password:
from_secret: docker_password
repo: drone/git
username: drone
when:
event:
- push
- tag
---
kind: pipeline
name: linux-arm64
platform:
os: linux
arch: arm64
steps:
- name: test
image: golang:1.10
commands:
- cd posix
- tar -xf fixtures.tar -C /
- go test -v
- name: push
image: plugins/docker:linux-arm64
settings:
auto_tag: true
auto_tag_suffix: linux-arm64
dockerfile: docker/Dockerfile.linux.arm64
password:
from_secret: docker_password
repo: drone/git
username: drone
when:
event:
- push
- tag
---
kind: pipeline
name: linux-arm
platform:
os: linux
arch: arm
steps:
- name: test
image: golang:1.10
commands:
- cd posix
- tar -xf fixtures.tar -C /
- go test -v
- name: push
image: plugins/docker:linux-arm
settings:
auto_tag: true
auto_tag_suffix: linux-arm
dockerfile: docker/Dockerfile.linux.arm
password:
from_secret: docker_password
repo: drone/git
username: drone
when:
event:
- push
- tag
---
kind: pipeline
type: ssh
name: windows-1809-amd64
platform:
os: windows
server:
host:
from_secret: windows_1809_server
user:
from_secret: windows_1809_username
password:
from_secret: windows_1809_password
steps:
- name: docker
environment:
PASSWORD:
from_secret: docker_password
commands:
- docker login -u drone -p $PASSWORD
- docker build -f docker/Dockerfile.windows.1809 -t drone/git:windows-1809-amd64 .
- docker push drone/git:windows-1809-amd64
when:
event:
- push
- tag
---
kind: pipeline
name: after
platform:
os: linux
arch: amd64
steps:
- name: manifest
image: plugins/manifest:1
settings:
ignore_missing: true
password:
from_secret: docker_password
spec: docker/manifest.tmpl
username: drone
when:
branch:
- master
event:
- push
depends_on:
- linux-arm
- linux-arm64
- linux-amd64
- windows-1809-amd64
...