Skip to content

Commit cb53c38

Browse files
committed
Add drone build configuration
1 parent f5b229d commit cb53c38

File tree

2 files changed

+111
-0
lines changed

2 files changed

+111
-0
lines changed

.drone.yml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
kind: pipeline
2+
name: amd64
3+
4+
platform:
5+
os: linux
6+
arch: amd64
7+
8+
steps:
9+
- name: build
10+
image: plugins/docker
11+
settings:
12+
auto_tag: true
13+
auto_tag_suffix: amd64
14+
repo: mazzolino/shepherd
15+
username:
16+
from_secret: docker_username
17+
password:
18+
from_secret: docker_password
19+
when:
20+
event:
21+
exclude:
22+
- pull_request
23+
24+
---
25+
kind: pipeline
26+
name: arm
27+
28+
platform:
29+
os: linux
30+
arch: arm
31+
32+
steps:
33+
- name: build
34+
image: plugins/docker:linux-arm
35+
settings:
36+
auto_tag: true
37+
auto_tag_suffix: arm
38+
repo: mazzolino/shepherd
39+
username:
40+
from_secret: docker_username
41+
password:
42+
from_secret: docker_password
43+
when:
44+
event:
45+
exclude:
46+
- pull_request
47+
48+
---
49+
kind: pipeline
50+
name: arm64
51+
52+
platform:
53+
os: linux
54+
arch: arm64
55+
56+
steps:
57+
- name: build
58+
image: plugins/docker:linux-arm64
59+
settings:
60+
auto_tag: true
61+
auto_tag_suffix: arm64
62+
repo: mazzolino/shepherd
63+
username:
64+
from_secret: docker_username
65+
password:
66+
from_secret: docker_password
67+
when:
68+
event:
69+
exclude:
70+
- pull_request
71+
---
72+
kind: pipeline
73+
name: manifest
74+
75+
steps:
76+
- name: manifest
77+
image: plugins/manifest:1
78+
settings:
79+
spec: manifest.tmpl
80+
auto_tag: true
81+
username:
82+
from_secret: docker_username
83+
password:
84+
from_secret: docker_password
85+
platforms:
86+
- linux/amd64
87+
- linux/arm
88+
- linux/arm64
89+
90+
depends_on:
91+
- amd64
92+
- arm
93+
- arm64

manifest.tmpl

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
image: mazzolino/shepherd:{{#if build.tag}}{{trimPrefix build.tag "v"}}{{else}}latest{{/if}}
2+
{{#if build.tags}}
3+
tags:
4+
{{#each build.tags}}
5+
- {{this}}
6+
{{/each}}
7+
{{/if}}
8+
manifests:
9+
-
10+
image: mazzolino/shepherd:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}amd64
11+
platform:
12+
architecture: amd64
13+
os: linux
14+
-
15+
image: mazzolino/shepherd:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}arm
16+
platform:
17+
architecture: arm
18+
os: linux

0 commit comments

Comments
 (0)