-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
89 lines (77 loc) · 1.55 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
kind: pipeline
name: default
common: &common
image: golang:alpine
commands:
- CGO_ENABLED=0 go build -v -o "${DRONE_REPO_NAME}-$${GOOS}-$${GOARCH}" -ldflags "-s -w"
steps:
- name: prepare-templates
image: golang:alpine
commands:
- apk add --no-cache git
- go get github.com/valyala/quicktemplate/qtc
- "$${GOPATH}/bin/qtc"
- name: build-linux-amd64
<<: *common
environment:
GOOS: linux
GOARCH: amd64
- name: build-linux-arm64
<<: *common
environment:
GOOS: linux
GOARCH: arm64
- name: build-linux-ppc64le
<<: *common
environment:
GOOS: linux
GOARCH: ppc64le
- name: build-dragonfly-amd64
<<: *common
environment:
GOOS: dragonfly
GOARCH: amd64
- name: build-freebsd-amd64
<<: *common
environment:
GOOS: freebsd
GOARCH: amd64
- name: build-openbsd-amd64
<<: *common
environment:
GOOS: openbsd
GOARCH: amd64
#- name: build-windows-amd64
# <<: *common
# environment:
# GOOS: windows
# GOARCH: amd64
#- name: build-darwin-amd64
# <<: *common
# environment:
# GOOS: darwin
# GOARCH: amd64
- name: test
image: golang:alpine
commands:
- apk add --no-cache gcc musl-dev # apparently still needed
- go test -v ./...
- name: deploy
image: plugins/s3
settings:
path_style: true
source: "${DRONE_REPO_NAME}-*"
target: "/${DRONE_REPO_NAME}"
bucket:
from_secret: s3_id
access_key:
from_secret: s3_id
secret_key:
from_secret: s3_key
endpoint:
from_secret: s3_endpoint
when:
branch:
- master
event:
- push