Skip to content

Commit de025d8

Browse files
adds drone builds for dockerhub
1 parent e998933 commit de025d8

File tree

3 files changed

+135
-0
lines changed

3 files changed

+135
-0
lines changed

.drone.yml

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,3 +114,106 @@ trigger:
114114
- beta-v2
115115
event:
116116
- push
117+
118+
---
119+
kind: pipeline
120+
type: docker
121+
name: amd64-dockerhub
122+
123+
platform:
124+
arch: amd64
125+
126+
steps:
127+
- name: submodules
128+
image: alpine/git
129+
commands:
130+
- git submodule init
131+
- 'git config --global url."https://github.com/".insteadOf git@github.com:'
132+
- "git submodule update --recursive --remote"
133+
- name: build and publish
134+
image: plugins/docker
135+
settings:
136+
username:
137+
from_secret: dockerhub_username
138+
password:
139+
from_secret: dockerhub_password
140+
repo: "kernai/${DRONE_REPO_NAME}"
141+
tag: "${DRONE_TAG}-drone-amd64"
142+
143+
trigger:
144+
event:
145+
- tag
146+
147+
---
148+
kind: pipeline
149+
type: docker
150+
name: arm64-dockerhub
151+
152+
platform:
153+
arch: arm64
154+
155+
steps:
156+
- name: submodules
157+
image: alpine/git
158+
commands:
159+
- git submodule init
160+
- 'git config --global url."https://github.com/".insteadOf git@github.com:'
161+
- "git submodule update --recursive --remote"
162+
- name: build and publish
163+
image: plugins/docker
164+
settings:
165+
username:
166+
from_secret: dockerhub_username
167+
password:
168+
from_secret: dockerhub_password
169+
repo: "kernai/${DRONE_REPO_NAME}"
170+
tag: "${DRONE_TAG}-drone-arm64"
171+
172+
trigger:
173+
event:
174+
- tag
175+
176+
---
177+
kind: pipeline
178+
name: manifest-version
179+
steps:
180+
- name: manifest
181+
image: plugins/manifest
182+
settings:
183+
spec: drone-manifest-version.tmpl
184+
tag: "${DRONE_TAG}"
185+
ignore_missing: true
186+
username:
187+
from_secret: dockerhub_username
188+
password:
189+
from_secret: dockerhub_password
190+
191+
depends_on:
192+
- amd64-dockerhub
193+
- arm64-dockerhub
194+
195+
trigger:
196+
event:
197+
- tag
198+
199+
---
200+
kind: pipeline
201+
name: manifest-latest
202+
steps:
203+
- name: manifest
204+
image: plugins/manifest
205+
settings:
206+
spec: drone-manifest-latest.tmpl
207+
tag: "${DRONE_TAG}"
208+
ignore_missing: true
209+
username:
210+
from_secret: dockerhub_username
211+
password:
212+
from_secret: dockerhub_password
213+
214+
depends_on:
215+
- manifest-version
216+
217+
trigger:
218+
event:
219+
- tag

drone-manifest-latest.tmpl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
image: kernai/refinery-embedder:latest
2+
manifests:
3+
-
4+
image: kernai/refinery-embedder:{{#if build.tag}}{{build.tag}}-{{/if}}drone-amd64
5+
platform:
6+
architecture: amd64
7+
os: linux
8+
-
9+
image: kernai/refinery-embedder:{{#if build.tag}}{{build.tag}}-{{/if}}drone-arm64
10+
platform:
11+
architecture: arm64
12+
os: linux
13+
variant: v8

drone-manifest-version.tmpl

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
image: kernai/refinery-embedder:{{#if build.tag}}{{build.tag}}{{else}}latest{{/if}}
2+
{{#if build.tags}}
3+
tags:
4+
{{#each build.tags}}
5+
- {{this}}
6+
{{/each}}
7+
{{/if}}
8+
manifests:
9+
-
10+
image: kernai/refinery-embedder:{{#if build.tag}}{{build.tag}}-{{/if}}drone-amd64
11+
platform:
12+
architecture: amd64
13+
os: linux
14+
-
15+
image: kernai/refinery-embedder:{{#if build.tag}}{{build.tag}}-{{/if}}drone-arm64
16+
platform:
17+
architecture: arm64
18+
os: linux
19+
variant: v8

0 commit comments

Comments
 (0)