harness-drone/.drone.yml
2022-06-09 11:19:50 +01:00

143 lines
2.2 KiB
YAML

---
kind: pipeline
type: docker
name: linux-amd64
platform:
arch: amd64
os: linux
steps:
- name: test
image: golang:1.14.15
commands:
- go test ./...
- go build -o /dev/null github.com/drone/drone/cmd/drone-server
- go build -o /dev/null -tags "oss nolimit" github.com/drone/drone/cmd/drone-server
- name: build
image: golang:1.14.15
commands:
- sh scripts/build.sh
environment:
GOARCH: amd64
GOOS: linux
- name: publish
image: plugins/docker:18
settings:
auto_tag: true
auto_tag_suffix: linux-amd64
dockerfile: docker/Dockerfile.server.linux.amd64
repo: drone/drone
username:
from_secret: docker_username
password:
from_secret: docker_password
when:
event:
- push
- tag
---
kind: pipeline
type: docker
name: linux-arm64
platform:
arch: arm64
os: linux
steps:
- name: build
image: golang:1.14.15
commands:
- sh scripts/build.sh
environment:
GOARCH: arm64
GOOS: linux
- name: publish
image: plugins/docker:18
settings:
auto_tag: true
auto_tag_suffix: linux-arm64
dockerfile: docker/Dockerfile.server.linux.arm64
repo: drone/drone
username:
from_secret: docker_username
password:
from_secret: docker_password
trigger:
event:
- push
- tag
depends_on:
- linux-amd64
---
kind: pipeline
type: docker
name: linux-arm
platform:
arch: arm
os: linux
steps:
- name: build
image: golang:1.14.15
commands:
- sh scripts/build.sh
environment:
GOARCH: arm
GOOS: linux
- name: publish
image: plugins/docker:18
settings:
auto_tag: true
auto_tag_suffix: linux-arm
dockerfile: docker/Dockerfile.server.linux.arm
repo: drone/drone
username:
from_secret: docker_username
password:
from_secret: docker_password
trigger:
event:
- push
- tag
depends_on:
- linux-amd64
---
kind: pipeline
type: docker
name: manifest
steps:
- name: publish
image: plugins/manifest:1.2
settings:
auto_tag: true
ignore_missing: true
spec: docker/manifest.server.tmpl
username:
from_secret: docker_username
password:
from_secret: docker_password
trigger:
event:
- push
- tag
depends_on:
- linux-arm64
- linux-arm