Skip to content

Commit e8536b1

Browse files
Mohamed Eldafrawiinnobead
authored andcommitted
update drone config
Signed-off-by: Mohamed Eldafrawi <mohamed.eldafrawi@suse.com>
1 parent 595fea1 commit e8536b1

File tree

1 file changed

+36
-19
lines changed

1 file changed

+36
-19
lines changed

.drone.yml

Lines changed: 36 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,28 @@ steps:
2424
- name: socket
2525
path: /var/run/docker.sock
2626

27-
- name: publish-master-image
27+
- name: fossa
28+
image: registry.suse.com/suse/sle15:15.3.17.8.1
29+
failure: ignore
30+
environment:
31+
FOSSA_API_KEY:
32+
from_secret: FOSSA_API_KEY
33+
commands:
34+
- zypper -n install curl unzip
35+
- "curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/spectrometer/master/install.sh | sh"
36+
- fossa analyze
37+
- fossa test
38+
when:
39+
instance:
40+
- drone-publish.longhorn.io
41+
ref:
42+
include:
43+
- "refs/heads/master"
44+
event:
45+
- push
46+
- tag
47+
48+
- name: publish-image
2849
image: plugins/docker
2950
settings:
3051
build_args:
@@ -34,14 +55,14 @@ steps:
3455
password:
3556
from_secret: docker_password
3657
repo: longhornio/backing-image-manager
37-
tag: "master-amd64"
58+
tag: "${DRONE_BRANCH}-head-amd64"
3859
username:
3960
from_secret: docker_username
4061
when:
41-
branch:
42-
- master
4362
event:
4463
- push
64+
instance:
65+
- drone-publish.longhorn.io
4566

4667
- name: publish-tagged-image
4768
image: plugins/docker
@@ -57,10 +78,10 @@ steps:
5778
username:
5879
from_secret: docker_username
5980
when:
60-
branch:
61-
- master
6281
event:
6382
- tag
83+
instance:
84+
- drone-publish.longhorn.io
6485

6586
- name: slack_notify
6687
image: plugins/slack
@@ -110,7 +131,7 @@ steps:
110131
- name: socket
111132
path: /var/run/docker.sock
112133

113-
- name: publish-master-image
134+
- name: publish-image
114135
image: plugins/docker
115136
settings:
116137
build_args:
@@ -120,14 +141,14 @@ steps:
120141
password:
121142
from_secret: docker_password
122143
repo: longhornio/backing-image-manager
123-
tag: "master-arm64"
144+
tag: "${DRONE_BRANCH}-head-arm64"
124145
username:
125146
from_secret: docker_username
126147
when:
127-
branch:
128-
- master
129148
event:
130149
- push
150+
instance:
151+
- drone-publish.longhorn.io
131152

132153
- name: publish-tagged-image
133154
image: plugins/docker
@@ -143,10 +164,10 @@ steps:
143164
username:
144165
from_secret: docker_username
145166
when:
146-
branch:
147-
- master
148167
event:
149168
- tag
169+
instance:
170+
- drone-publish.longhorn.io
150171

151172
- name: slack_notify
152173
image: plugins/slack
@@ -179,7 +200,7 @@ platform:
179200
arch: amd64
180201

181202
steps:
182-
- name: manifest-master
203+
- name: manifest
183204
image: plugins/manifest:1
184205
settings:
185206
username:
@@ -189,13 +210,11 @@ steps:
189210
platforms:
190211
- linux/amd64
191212
- linux/arm64
192-
target: "longhornio/backing-image-manager:master"
193-
template: "longhornio/backing-image-manager:master-ARCH"
213+
target: "longhornio/backing-image-manager:${DRONE_BRANCH}-head"
214+
template: "longhornio/backing-image-manager:${DRONE_BRANCH}-head-ARCH"
194215
when:
195216
instance:
196217
- drone-publish.longhorn.io
197-
branch:
198-
- master
199218
event:
200219
- push
201220

@@ -214,8 +233,6 @@ steps:
214233
when:
215234
instance:
216235
- drone-publish.longhorn.io
217-
branch:
218-
- master
219236
event:
220237
- tag
221238

0 commit comments

Comments
 (0)