Skip to content

Commit 9ab6f1e

Browse files
committed
chore(pack-images): use exec runner replace docker runner
1 parent c023179 commit 9ab6f1e

1 file changed

Lines changed: 20 additions & 64 deletions

File tree

.drone/drone.yml

Lines changed: 20 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
kind: pipeline
2-
type: docker
2+
type: exec
33
name: linux-pack-amd64
44

55
platform:
66
arch: amd64
77
os: linux
88

99
steps:
10+
- name: install pack
11+
commands:
12+
- docker run --rm -v /usr/local/bin:/tmp/bin docker.io/drycc/go-dev cp /usr/local/bin/pack /tmp/bin
13+
1014
- name: test
11-
image: docker.io/drycc/go-dev
12-
pull: always
13-
privileged: true
1415
commands:
1516
- STACK=20 make test-style
1617
environment:
@@ -25,14 +26,8 @@ steps:
2526
- push
2627
- tag
2728
- pull_request
28-
volumes:
29-
- name: image_registries
30-
path: /etc/containers/registries.conf
3129

3230
- name: publish pack
33-
image: docker.io/drycc/go-dev
34-
pull: always
35-
privileged: true
3631
commands:
3732
- echo $DOCKER_PASSWORD | docker login $DRYCC_REGISTRY --username $DOCKER_USERNAME --password-stdin
3833
- STACK=20 VERSION=20-linux-amd64 make publish-pack
@@ -49,35 +44,22 @@ steps:
4944
event:
5045
- push
5146
- tag
52-
volumes:
53-
- name: image_registries
54-
path: /etc/containers/registries.conf
55-
56-
trigger:
57-
event:
58-
- push
59-
- tag
60-
- pull_request
61-
62-
volumes:
63-
- name: image_registries
64-
host:
65-
path: /etc/containers/registries.conf
6647

6748
---
6849
kind: pipeline
69-
type: docker
50+
type: exec
7051
name: linux-pack-arm64
7152

7253
platform:
7354
arch: arm64
7455
os: linux
7556

7657
steps:
58+
- name: install pack
59+
commands:
60+
- docker run --rm -v /usr/local/bin:/tmp/bin docker.io/drycc/go-dev cp /usr/local/bin/pack /tmp/bin
61+
7762
- name: publish pack
78-
image: docker.io/drycc/go-dev
79-
pull: always
80-
privileged: true
8163
commands:
8264
- echo $DOCKER_PASSWORD | docker login $DRYCC_REGISTRY --username $DOCKER_USERNAME --password-stdin
8365
- STACK=20 VERSION=20-linux-arm64 make publish-pack
@@ -90,9 +72,6 @@ steps:
9072
from_secret: docker_username
9173
DOCKER_PASSWORD:
9274
from_secret: docker_password
93-
volumes:
94-
- name: image_registries
95-
path: /etc/containers/registries.conf
9675

9776
trigger:
9877
event:
@@ -158,7 +137,7 @@ depends_on:
158137

159138
---
160139
kind: pipeline
161-
type: docker
140+
type: exec
162141
name: linux-buildpacks-amd64
163142

164143
platform:
@@ -167,13 +146,8 @@ platform:
167146

168147
steps:
169148
- name: publish amd64 buildpack
170-
image: docker.io/drycc/go-dev
171-
pull: always
172-
privileged: true
173149
commands:
174150
- echo $DOCKER_PASSWORD | docker login $DRYCC_REGISTRY --username $DOCKER_USERNAME --password-stdin
175-
- docker system service --time 0 unix:///var/run/docker.sock &
176-
- sleep 9
177151
- STACK=20 VERSION=20-linux-amd64 make publish-buildpack
178152
environment:
179153
DEV_REGISTRY:
@@ -184,21 +158,17 @@ steps:
184158
from_secret: docker_username
185159
DOCKER_PASSWORD:
186160
from_secret: docker_password
187-
volumes:
188-
- name: image_registries
189-
path: /etc/containers/registries.conf
190-
191-
trigger:
192-
event:
193-
- push
194-
- tag
161+
when:
162+
event:
163+
- push
164+
- tag
195165

196166
depends_on:
197167
- manifest-pack
198168

199169
---
200170
kind: pipeline
201-
type: docker
171+
type: exec
202172
name: linux-buildpacks-arm64
203173

204174
platform:
@@ -207,13 +177,8 @@ platform:
207177

208178
steps:
209179
- name: publish arm64 buildpack
210-
image: docker.io/drycc/go-dev
211-
pull: always
212-
privileged: true
213180
commands:
214181
- echo $DOCKER_PASSWORD | docker login $DRYCC_REGISTRY --username $DOCKER_USERNAME --password-stdin
215-
- docker system service --time 0 unix:///var/run/docker.sock &
216-
- sleep 9
217182
- STACK=20 VERSION=20-linux-arm64 make publish-buildpack
218183
environment:
219184
DEV_REGISTRY:
@@ -224,14 +189,10 @@ steps:
224189
from_secret: docker_username
225190
DOCKER_PASSWORD:
226191
from_secret: docker_password
227-
volumes:
228-
- name: image_registries
229-
path: /etc/containers/registries.conf
230-
231-
trigger:
232-
event:
233-
- push
234-
- tag
192+
when:
193+
event:
194+
- push
195+
- tag
235196

236197
depends_on:
237198
- manifest-pack
@@ -277,8 +238,3 @@ trigger:
277238
depends_on:
278239
- linux-buildpacks-amd64
279240
- linux-buildpacks-arm64
280-
281-
volumes:
282-
- name: image_registries
283-
host:
284-
path: /etc/containers/registries.conf

0 commit comments

Comments
 (0)