Skip to content

Commit 729d073

Browse files
author
TP Honey
authored
Create .drone.yml
1 parent 88cb1a9 commit 729d073

File tree

1 file changed

+255
-0
lines changed

1 file changed

+255
-0
lines changed

.drone.yml

Lines changed: 255 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,255 @@
1+
kind: pipeline
2+
type: vm
3+
name: testing
4+
platform:
5+
os: linux
6+
arch: amd64
7+
pool:
8+
use: ubuntu
9+
10+
steps:
11+
- name: lint
12+
image: golang:1.19
13+
pull: always
14+
commands:
15+
- go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
16+
- golangci-lint version
17+
- golangci-lint run
18+
volumes:
19+
- name: gopath
20+
path: "/go"
21+
- name: test
22+
image: golang:1.19
23+
commands:
24+
- go test -cover ./...
25+
volumes:
26+
- name: gopath
27+
path: "/go"
28+
volumes:
29+
- name: gopath
30+
temp: {}
31+
trigger:
32+
ref:
33+
- refs/heads/master
34+
- refs/tags/**
35+
- refs/pull/**
36+
37+
---
38+
kind: pipeline
39+
type: vm
40+
name: linux-amd64
41+
platform:
42+
os: linux
43+
arch: amd64
44+
pool:
45+
use: ubuntu
46+
47+
steps:
48+
- name: environment
49+
image: golang:1.19
50+
pull: always
51+
environment:
52+
CGO_ENABLED: '0'
53+
commands:
54+
- go version
55+
- go env
56+
- name: build
57+
image: golang:1.19
58+
environment:
59+
CGO_ENABLED: '0'
60+
commands:
61+
- go build -v -ldflags "-X main.version=" -a -tags netgo -o release/linux/amd64/drone-download .
62+
- name: docker
63+
image: plugins/docker
64+
settings:
65+
dockerfile: docker/Dockerfile.linux.amd64
66+
repo: plugins/download
67+
username:
68+
from_secret: docker_username
69+
password:
70+
from_secret: docker_password
71+
auto_tag: true
72+
auto_tag_suffix: linux-amd64
73+
depends_on:
74+
- testing
75+
trigger:
76+
ref:
77+
- refs/heads/master
78+
- refs/tags/**
79+
- refs/pull/**
80+
81+
---
82+
kind: pipeline
83+
type: docker
84+
name: linux-arm64
85+
platform:
86+
os: linux
87+
arch: arm64
88+
pool:
89+
use: ubuntu_arm64
90+
91+
steps:
92+
- name: environment
93+
image: golang:1.19
94+
pull: always
95+
environment:
96+
CGO_ENABLED: '0'
97+
commands:
98+
- go version
99+
- go env
100+
- name: build
101+
image: golang:1.19
102+
environment:
103+
CGO_ENABLED: '0'
104+
commands:
105+
- go build -v -ldflags "-X main.version=" -a -tags netgo -o release/linux/arm64/drone-download .
106+
- name: docker
107+
image: plugins/docker
108+
settings:
109+
dockerfile: docker/Dockerfile.linux.arm64
110+
repo: plugins/download
111+
username:
112+
from_secret: docker_username
113+
password:
114+
from_secret: docker_password
115+
auto_tag: true
116+
auto_tag_suffix: linux-arm64
117+
depends_on:
118+
- testing
119+
trigger:
120+
ref:
121+
- refs/heads/master
122+
- refs/tags/**
123+
- refs/pull/**
124+
125+
---
126+
kind: pipeline
127+
type: vm
128+
name: windows-1809
129+
platform:
130+
os: windows
131+
arch: amd64
132+
pool:
133+
use: windows
134+
135+
steps:
136+
- name: environment
137+
image: golang:1.19
138+
pull: always
139+
environment:
140+
CGO_ENABLED: '0'
141+
commands:
142+
- go version
143+
- go env
144+
- name: build
145+
image: golang:1.19
146+
environment:
147+
CGO_ENABLED: '0'
148+
commands:
149+
- go build -v -ldflags "-X main.version=" -a -tags netgo -o release/windows/amd64/drone-download.exe .
150+
- name: docker
151+
image: plugins/docker
152+
settings:
153+
dockerfile: docker/Dockerfile.windows.1809
154+
repo: plugins/download
155+
username:
156+
from_secret: docker_username
157+
password:
158+
from_secret: docker_password
159+
auto_tag: true
160+
auto_tag_suffix: windows-1809-amd64
161+
daemon_off: true
162+
purge: false
163+
when:
164+
ref:
165+
- refs/heads/master
166+
- refs/tags/**
167+
depends_on:
168+
- testing
169+
trigger:
170+
ref:
171+
- refs/heads/master
172+
- refs/tags/**
173+
- refs/pull/**
174+
175+
176+
---
177+
kind: pipeline
178+
type: vm
179+
name: windows-ltsc2022
180+
platform:
181+
os: windows
182+
arch: amd64
183+
pool:
184+
use: windows-2022
185+
186+
steps:
187+
- name: environment
188+
image: golang:1.19
189+
pull: always
190+
environment:
191+
CGO_ENABLED: '0'
192+
commands:
193+
- go version
194+
- go env
195+
- name: build
196+
image: golang:1.19
197+
environment:
198+
CGO_ENABLED: '0'
199+
commands:
200+
- go build -v -ldflags "-X main.version=" -a -tags netgo -o release/windows/amd64/drone-download.exe .
201+
- name: docker
202+
image: plugins/docker
203+
settings:
204+
dockerfile: docker/Dockerfile.windows.ltsc2022
205+
repo: plugins/download
206+
username:
207+
from_secret: docker_username
208+
password:
209+
from_secret: docker_password
210+
auto_tag: true
211+
auto_tag_suffix: windows-ltsc2022-amd64
212+
daemon_off: true
213+
purge: false
214+
when:
215+
ref:
216+
- refs/heads/master
217+
- refs/tags/**
218+
depends_on:
219+
- testing
220+
trigger:
221+
ref:
222+
- refs/heads/master
223+
- refs/tags/**
224+
- refs/pull/**
225+
226+
---
227+
kind: pipeline
228+
type: vm
229+
name: manifest
230+
platform:
231+
os: linux
232+
arch: amd64
233+
pool:
234+
use: ubuntu
235+
236+
steps:
237+
- name: manifest
238+
image: plugins/manifest
239+
settings:
240+
auto_tag: 'true'
241+
username:
242+
from_secret: docker_username
243+
password:
244+
from_secret: docker_password
245+
spec: docker/manifest.tmpl
246+
ignore_missing: true
247+
depends_on:
248+
- linux-amd64
249+
- linux-arm64
250+
- windows-1809
251+
- windows-ltsc2022
252+
trigger:
253+
ref:
254+
- refs/heads/master
255+
- refs/tags/**

0 commit comments

Comments
 (0)