-
Notifications
You must be signed in to change notification settings - Fork 1
/
.drone.yml
119 lines (103 loc) · 1.77 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
107
108
109
110
111
112
113
114
115
116
117
118
119
---
kind: pipeline
type: kubernetes
name: testing
platform:
arch: amd64
os: linux
steps:
- name: restore-cache
image: meltwater/drone-cache
pull: always
settings:
restore: true
backend: filesystem
mount: [ "vendor" ]
volumes:
- name: cache
path: /tmp/cache
- name: test-golang1.22
image: golang:1.22
pull: always
environment:
CGO_ENABLED: 0
commands:
- make vendor
- make test
- name: rebuild-cache
image: meltwater/drone-cache
pull: always
settings:
rebuild: true
backend: filesystem
mount: [ "vendor" ]
volumes:
- name: cache
path: /tmp/cache
volumes:
- name: cache
host:
path: /var/drone/cache/gits
---
kind: pipeline
type: kubernetes
name: release-binaries
depends_on:
- testing
platform:
arch: amd64
os: linux
trigger:
ref:
- refs/tags/**
steps:
- name: restore-cache
image: meltwater/drone-cache
pull: always
settings:
restore: true
backend: filesystem
mount: [ "vendor" ]
volumes:
- name: cache
path: /tmp/cache
- name: build-all-binary
image: golang:1.22
pull: always
commands:
- make VERSION=${DRONE_TAG} -j2
environment:
CGO_ENABLED: 0
GOCACHE: "/drone/src/.cache"
when:
event: [ tag ]
- image: plugins/github-release
name: deploy-all-binary
pull: always
settings:
api_key:
from_secret: gits_github_release_api_key
files:
- bin/release/*
when:
event: [ tag ]
- name: rebuild-cache
image: meltwater/drone-cache
pull: always
settings:
rebuild: true
backend: filesystem
mount: [ "vendor" ]
volumes:
- name: cache
path: /tmp/cache
volumes:
- name: cache
host:
path: /var/drone/cache/gits
---
kind: secret
name: gits_github_release_api_key
get:
path: gits-ci
name: GITHUB_TOKEN