This repository has been archived by the owner on Aug 20, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
/
.drone.yml
106 lines (96 loc) · 2.44 KB
/
.drone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
---
kind: pipeline
type: docker
name: amd64
platform:
os: linux
arch: amd64
steps:
- name: build-binaries
image: rancher/dapper:v0.5.0
environment:
GOLANG: golang:1.16beta1-alpine
commands:
- dapper -f Dockerfile --target dapper make GOOS=linux GOARCH=amd64 DRONE_TAG=${DRONE_TAG} dist
- dapper -f Dockerfile --target dapper make GOOS=linux GOARCH=arm64 DRONE_TAG=${DRONE_TAG} dist
- dapper -f Dockerfile --target dapper make GOOS=darwin GOARCH=amd64 DRONE_TAG=${DRONE_TAG} dist
- dapper -f Dockerfile --target dapper make GOOS=darwin GOARCH=arm64 DRONE_TAG=${DRONE_TAG} dist
- dapper -f Dockerfile --target dapper make GOOS=windows GOARCH=amd64 DRONE_TAG=${DRONE_TAG} dist
volumes:
- name: docker
path: /var/run/docker.sock
- name: publish-binaries
image: plugins/github-release
settings:
api_key:
from_secret: github_token
checksum:
- sha256
checksum_file: CHECKSUMsum.txt
checksum_flatten: true
files:
- dist/artifacts/*
prerelease: true
when:
event:
- tag
instance:
- drone-publish.rancher.io
ref:
- refs/head/master
- refs/tags/*
- name: publish-images
image: golang:1.16beta1-alpine
commands:
- apk --no-cache add docker-cli file git make
- docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
- make DRONE_TAG=${DRONE_TAG} publish
environment:
DOCKER_USERNAME:
from_secret: docker_username
DOCKER_PASSWORD:
from_secret: docker_password
when:
event:
- tag
instance:
- drone-publish.rancher.io
ref:
- refs/head/master
- refs/tags/*
volumes:
- name: docker
host:
path: /var/run/docker.sock
---
kind: pipeline
type: docker
name: arm64
platform:
os: linux
arch: arm64
steps:
- name: publish-images
image: golang:1.16beta1-alpine
commands:
- apk --no-cache add docker-cli file git make
- docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
- make DRONE_TAG=${DRONE_TAG} publish
environment:
DOCKER_USERNAME:
from_secret: docker_username
DOCKER_PASSWORD:
from_secret: docker_password
when:
event:
- tag
instance:
- drone-publish.rancher.io
ref:
- refs/head/master
- refs/tags/*
volumes:
- name: docker
host:
path: /var/run/docker.sock
...