-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.drone.yml
204 lines (181 loc) · 3.76 KB
/
.drone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
kind: pipeline
type: docker
name: api-default
trigger:
event:
exclude:
- promote
- pull_request
steps:
- name: wait services initialization
image: bash
commands:
- sleep 30
- name: api test
image: node:16.19.0-alpine
commands:
- apk update && apk upgrade
- node -v
- cd api/
- npm ci
- npm run ci-test-token
- npm run ci-test-token-enterprise
- npm run ci-test-native
services:
- name: chain-token
image: iexechub/poco-chaintest:5.3.0-token-parity
pull: true
- name: chain-native
image: iexechub/poco-chaintest:5.3.0-native-parity
pull: true
- name: mongo
image: mongo:latest
pull: true
- name: redis
image: redis:alpine
pull: true
---
kind: pipeline
type: docker
name: watcher-default
trigger:
event:
exclude:
- promote
- pull_request
steps:
- name: wait services initialization
image: bash
commands:
- sleep 30
- name: watcher test
image: node:16.19.0-alpine
commands:
- apk update && apk upgrade
- node -v
- cd watcher/
- npm ci
- npm run ci-test-token
- npm run ci-test-token-enterprise
- npm run ci-test-native
services:
- name: chain-token
image: iexechub/poco-chaintest:5.3.0-token-parity
pull: true
- name: chain-native
image: iexechub/poco-chaintest:5.3.0-native-parity
pull: true
- name: mongo
image: mongo:latest
pull: true
- name: redis
image: redis:alpine
pull: true
---
kind: pipeline
type: docker
name: publish api dry-run
trigger:
event:
exclude:
- promote
steps:
- name: docker publish dry-run
image: plugins/docker
pull: always
settings:
repo: iexechub/iexec-market-api
dockerfile: Dockerfile.api
dry_run: true
---
kind: pipeline
type: docker
name: publish watcher dry-run
trigger:
event:
exclude:
- promote
steps:
- name: docker publish dry-run
image: plugins/docker
pull: always
settings:
repo: iexechub/iexec-market-watcher
dockerfile: Dockerfile.watcher
dry_run: true
---
kind: pipeline
type: docker
name: publish nightly
trigger:
event:
- promote
target:
- nightly
steps:
- name: docker publish api
image: plugins/docker
pull: always
settings:
dockerfile: Dockerfile.api
repo: iexechub/iexec-market-api
tags:
- ${DRONE_BRANCH}
- ${DRONE_BRANCH}-${DRONE_COMMIT}
username:
from_secret: docker_username
password:
from_secret: docker_password
- name: docker publish watcher
image: plugins/docker
pull: always
settings:
dockerfile: Dockerfile.watcher
repo: iexechub/iexec-market-watcher
tags:
- ${DRONE_BRANCH}
- ${DRONE_BRANCH}-${DRONE_COMMIT}
username:
from_secret: docker_username
password:
from_secret: docker_password
---
kind: pipeline
type: docker
name: publish latest
# promote latest on tag semver tags
trigger:
event:
- promote
target:
- latest
ref:
include:
- refs/tags/v[0-9]*.*[0-9].*[0-9]
exclude:
- refs/tags/v*.*.*.*
- refs/tags/v*-*
- refs/tags/v*[a-zA-Z]*
steps:
- name: docker publish api
image: plugins/docker
pull: always
settings:
dockerfile: Dockerfile.api
repo: iexechub/iexec-market-api
auto_tag: true
username:
from_secret: docker_username
password:
from_secret: docker_password
- name: docker publish watcher
image: plugins/docker
pull: always
settings:
dockerfile: Dockerfile.watcher
repo: iexechub/iexec-market-watcher
auto_tag: true
username:
from_secret: docker_username
password:
from_secret: docker_password