-
Notifications
You must be signed in to change notification settings - Fork 1
/
.drone.yml
51 lines (47 loc) · 1.19 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
kind: pipeline
name: default
steps:
- name: test
image: golang
commands:
- go test ./...
- name: docker
image: plugins/docker
settings:
repo: bitsbeats/prometheus-acls
username:
from_secret: docker_username
password:
from_secret: docker_password
auto_tag: true
depends_on:
- test
- name: build
image: golang
commands:
- go build -mod=vendor -ldflags="-s -w" -o prometheus-acls-linux-amd64 .
- GOARCH=386 go build -mod=vendor -ldflags="-s -w" -o prometheus-acls-linux-386 .
- GOARCH=arm go build -mod=vendor -ldflags="-s -w" -o prometheus-acls-linux-arm .
- GOARCH=arm64 go build -mod=vendor -ldflags="-s -w" -o prometheus-acls-linux-arm64 .
when:
event: tag
depends_on:
- test
- name: release
image: plugins/github-release
settings:
api_key:
from_secret: github_token
files:
- prometheus-acls-linux-386
- prometheus-acls-linux-amd64
- prometheus-acls-linux-arm
- prometheus-acls-linux-arm64
checksum:
- md5
- sha1
- sha256
when:
event: tag
depends_on:
- build