1
1
---
2
2
kind : pipeline
3
3
type : docker
4
- name : amd64
4
+ name : cross
5
5
6
6
platform :
7
7
os : linux
20
20
- name : docker
21
21
path : /var/run/docker.sock
22
22
23
- - name : build
23
+ - name : bin-dist
24
24
image : drone.cattle.io/rancher/kim:possible
25
25
pull : never
26
26
environment :
@@ -39,19 +39,23 @@ steps:
39
39
- name : docker
40
40
path : /var/run/docker.sock
41
41
42
- - name : image
42
+ - name : img-dist
43
43
image : drone.cattle.io/rancher/kim:possible
44
44
pull : never
45
45
environment :
46
46
DOCKER_BUILDKIT : " 1"
47
47
GOLANG : drone.cattle.io/rancher/kim:possible
48
48
commands :
49
- - make TAG=${DRONE_TAG:-$(git describe --tags --always)} image
49
+ - make TAG=${DRONE_TAG:-$(git describe --tags --always)} GOARCH=amd64 image-dist
50
+ - make TAG=${DRONE_TAG:-$(git describe --tags --always)} GOARCH=arm64 image-dist
51
+ - make TAG=${DRONE_TAG:-$(git describe --tags --always)} GOARCH=arm image-dist
52
+ - make TAG=${DRONE_TAG:-$(git describe --tags --always)} GOARCH=ppc64le image-dist
53
+ - make TAG=${DRONE_TAG:-$(git describe --tags --always)} GOARCH=s390x image-dist
50
54
volumes :
51
55
- name : docker
52
56
path : /var/run/docker.sock
53
57
54
- - name : upload
58
+ - name : bin- upload
55
59
image : plugins/github-release
56
60
settings :
57
61
api_key :
72
76
- refs/head/master
73
77
- refs/tags/*
74
78
75
- - name : image -push
79
+ - name : img -push
76
80
image : drone.cattle.io/rancher/kim:possible
77
81
pull : never
78
82
environment :
@@ -84,135 +88,11 @@ steps:
84
88
GOLANG : drone.cattle.io/rancher/kim:possible
85
89
commands :
86
90
- docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
87
- - make TAG=${DRONE_TAG:-$(git describe --tags --always)} image-push
88
- volumes :
89
- - name : docker
90
- path : /var/run/docker.sock
91
- when :
92
- event :
93
- - tag
94
- instance :
95
- - drone-publish.rancher.io
96
- ref :
97
- - refs/head/master
98
- - refs/tags/*
99
-
100
- volumes :
101
- - name : docker
102
- host :
103
- path : /var/run/docker.sock
104
-
105
- ---
106
- kind : pipeline
107
- type : docker
108
- name : arm64
109
-
110
- platform :
111
- os : linux
112
- arch : arm64
113
-
114
- steps :
115
- - name : prepare
116
- image : library/alpine:3.12
117
- environment :
118
- GOLANG : golang:1.16-alpine3.12
119
- IMAGE : drone.cattle.io/rancher/kim
120
- commands :
121
- - " apk --no-cache add docker-cli git"
122
- - " docker build --target docker --build-arg GOLANG --tag $${IMAGE}:possible --tag $${IMAGE}:$(git rev-parse --short HEAD) ."
123
- volumes :
124
- - name : docker
125
- path : /var/run/docker.sock
126
-
127
- - name : image
128
- image : drone.cattle.io/rancher/kim:possible
129
- pull : never
130
- environment :
131
- DOCKER_BUILDKIT : " 1"
132
- GOLANG : drone.cattle.io/rancher/kim:possible
133
- commands :
134
- - make TAG=${DRONE_TAG:-$(git describe --tags --always)} image
135
- volumes :
136
- - name : docker
137
- path : /var/run/docker.sock
138
-
139
- - name : image-push
140
- image : drone.cattle.io/rancher/kim:possible
141
- pull : never
142
- environment :
143
- DOCKER_USERNAME :
144
- from_secret : docker_username
145
- DOCKER_PASSWORD :
146
- from_secret : docker_password
147
- DOCKER_BUILDKIT : " 1"
148
- GOLANG : drone.cattle.io/rancher/kim:possible
149
- commands :
150
- - docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
151
- - make TAG=${DRONE_TAG:-$(git describe --tags --always)} image-push
152
- volumes :
153
- - name : docker
154
- path : /var/run/docker.sock
155
- when :
156
- event :
157
- - tag
158
- instance :
159
- - drone-publish.rancher.io
160
- ref :
161
- - refs/head/master
162
- - refs/tags/*
163
-
164
- volumes :
165
- - name : docker
166
- host :
167
- path : /var/run/docker.sock
168
-
169
- ---
170
- kind : pipeline
171
- type : docker
172
- name : armhf
173
-
174
- platform :
175
- os : linux
176
- arch : arm
177
-
178
- steps :
179
- - name : prepare
180
- image : library/alpine:3.12
181
- environment :
182
- GOLANG : golang:1.16-alpine3.12
183
- IMAGE : drone.cattle.io/rancher/kim
184
- commands :
185
- - " apk --no-cache add docker-cli git"
186
- - " docker build --target docker --build-arg GOLANG --tag $${IMAGE}:possible --tag $${IMAGE}:$(git rev-parse --short HEAD) ."
187
- volumes :
188
- - name : docker
189
- path : /var/run/docker.sock
190
-
191
- - name : image
192
- image : drone.cattle.io/rancher/kim:possible
193
- pull : never
194
- environment :
195
- DOCKER_BUILDKIT : " 1"
196
- GOLANG : drone.cattle.io/rancher/kim:possible
197
- commands :
198
- - make TAG=${DRONE_TAG:-$(git describe --tags --always)} image
199
- volumes :
200
- - name : docker
201
- path : /var/run/docker.sock
202
-
203
- - name : image-push
204
- image : drone.cattle.io/rancher/kim:possible
205
- pull : never
206
- environment :
207
- DOCKER_USERNAME :
208
- from_secret : docker_username
209
- DOCKER_PASSWORD :
210
- from_secret : docker_password
211
- DOCKER_BUILDKIT : " 1"
212
- GOLANG : drone.cattle.io/rancher/kim:possible
213
- commands :
214
- - docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
215
- - make TAG=${DRONE_TAG:-$(git describe --tags --always)} image-push
91
+ - make TAG=${DRONE_TAG:-$(git describe --tags --always)} GOARCH=amd64 image-push
92
+ - make TAG=${DRONE_TAG:-$(git describe --tags --always)} GOARCH=arm64 image-push
93
+ - make TAG=${DRONE_TAG:-$(git describe --tags --always)} GOARCH=arm image-push
94
+ - make TAG=${DRONE_TAG:-$(git describe --tags --always)} GOARCH=ppc64le image-push
95
+ - make TAG=${DRONE_TAG:-$(git describe --tags --always)} GOARCH=s390x image-push
216
96
volumes :
217
97
- name : docker
218
98
path : /var/run/docker.sock
@@ -237,10 +117,10 @@ name: manifest
237
117
238
118
platform :
239
119
os : linux
240
- arch : arm
120
+ arch : amd64
241
121
242
122
steps :
243
- - name : manifest
123
+ - name : all
244
124
image : drone.cattle.io/rancher/kim:possible
245
125
pull : never
246
126
environment :
@@ -266,8 +146,6 @@ steps:
266
146
- refs/tags/*
267
147
268
148
depends_on :
269
- - amd64
270
- - arm64
271
- - armhf
149
+ - cross
272
150
273
151
...
0 commit comments