drone-docker/.drone.yml

127 lines
2.2 KiB
YAML
Raw Normal View History

---
kind: pipeline
name: testing
platform:
os: linux
arch: amd64
steps:
- name: vet
image: golang:1.17.3
commands:
- go vet ./...
environment:
GO111MODULE: on
2019-02-10 13:26:22 +01:00
volumes:
- name: gopath
path: /go
- name: test
image: golang:1.17.3
commands:
- go test -cover ./...
environment:
GO111MODULE: on
2019-02-10 13:26:22 +01:00
volumes:
- name: gopath
path: /go
volumes:
- name: gopath
temp: {}
trigger:
2019-02-10 13:26:22 +01:00
ref:
- refs/heads/master
- refs/heads/edge-dind
- refs/heads/feature-*
2019-02-10 13:26:22 +01:00
- "refs/tags/**"
- "refs/pull/**"
---
kind: pipeline
2019-01-21 01:05:01 +01:00
name: linux-amd64-docker
platform:
os: linux
arch: amd64
steps:
2019-01-21 01:05:01 +01:00
- name: build-push
image: golang:1.17.3
commands:
2019-02-15 10:25:21 +01:00
- "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/amd64/drone-docker ./cmd/drone-docker"
environment:
CGO_ENABLED: 0
GO111MODULE: on
when:
event:
2019-02-10 13:26:22 +01:00
exclude:
- tag
2019-01-21 01:05:01 +01:00
- name: build-tag
image: golang:1.17.3
commands:
2019-02-15 10:25:21 +01:00
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/amd64/drone-docker ./cmd/drone-docker"
environment:
CGO_ENABLED: 0
GO111MODULE: on
when:
event:
- tag
2019-01-22 23:12:12 +01:00
- name: executable
image: golang:1.17.3
2019-01-22 23:12:12 +01:00
commands:
- ./release/linux/amd64/drone-docker --help
- name: dryrun
pull: always
2021-06-08 22:41:48 +02:00
image: immawanderer/drone-docker:linux-amd64
settings:
2021-06-08 22:41:48 +02:00
daemon_off: true
dockerfile: docker/docker/Dockerfile.linux.amd64
dry_run: true
repo: immawanderer/drone-docker
tags: [linux-amd64, edge-dind]
when:
event: [push, pull_request]
2019-01-22 23:12:12 +01:00
2019-01-21 01:05:01 +01:00
- name: publish
pull: always
image: immawanderer/drone-docker:linux-amd64
settings:
2019-02-10 13:26:22 +01:00
daemon_off: false
dockerfile: docker/docker/Dockerfile.linux.amd64
tags:
- latest
- edge-dind
- linux-amd64
- ${DRONE_COMMIT_SHA:0:8}
- ${DRONE_COMMIT_SHA:0:8}-edge-dind
- ${DRONE_COMMIT_SHA:0:8}-linux-amd64
repo: immawanderer/drone-docker
username:
from_secret: docker_username
password:
from_secret: docker_password
when:
branch: [edge-dind]
event:
2019-02-10 13:26:22 +01:00
exclude:
- pull_request
2019-01-21 01:05:01 +01:00
trigger:
2019-02-10 13:26:22 +01:00
ref:
- refs/heads/master
- refs/heads/edge-dind
- refs/heads/feature-*
2019-02-10 13:26:22 +01:00
- "refs/tags/**"
- "refs/pull/**"
2019-01-21 01:05:01 +01:00
depends_on:
- testing
2021-02-16 15:44:28 +01:00
...