forked from iExecBlockchainComputing/iexec-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.yml
376 lines (342 loc) · 9.04 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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
kind: pipeline
type: docker
name: default
trigger:
event:
exclude:
- promote
- pull_request
steps:
- name: test
image: node:18
pull: always
environment:
ALCHEMY_API_KEY:
from_secret: alchemy_api_key
INFURA_PROJECT_ID:
from_secret: infura_project_id
ETHERSCAN_API_KEY:
from_secret: etherscan_api_key
commands:
- apt update
- apt install xxd
- node -v
- npm -v
- npm ci
- npm run build
- npm -g install .
- npm test
depends_on:
- token-chain
- native-chain
- token-chain
- token-sms-scone
- token-sms-gramine
- token-gateway
- token-watcher
- token-result-proxy
- name: code analysis
image: sonarsource/sonar-scanner-cli
pull: always
environment:
SONAR_TOKEN:
from_secret: sonar_token
SONAR_HOST:
from_secret: sonar_host
commands:
- sonar-scanner -Dsonar.host.url=$SONAR_HOST -Dsonar.branch.name=$DRONE_BRANCH
depends_on:
- test
- name: test node 20
image: node:20
pull: always
environment:
ALCHEMY_API_KEY:
from_secret: alchemy_api_key
INFURA_PROJECT_ID:
from_secret: infura_project_id
ETHERSCAN_API_KEY:
from_secret: etherscan_api_key
commands:
- apt update
- apt install xxd
- node -v
- npm -v
- npm ci
- npm run build
- npm -g install .
- npm test
when:
event:
- tag
depends_on:
- test
- code analysis
- token-chain
- native-chain
- token-chain
- token-sms-scone
- token-sms-gramine
- token-gateway
- token-watcher
- token-result-proxy
services:
- name: token-chain
image: iexechub/poco-chaintest:5.3.2-token-openethereum
pull: always
- name: native-chain
image: iexechub/poco-chaintest:5.3.2-native-openethereum
pull: always
- name: token-sms-scone
image: iexechub/iexec-sms:7.1.0
pull: always
commands:
- sleep 10
- java -jar /app/iexec-sms.jar
environment:
TZ: Europe/Paris
IEXEC_SMS_BLOCKCHAIN_NODE_ADDRESS: http://token-chain:8545
IEXEC_HUB_ADDRESS: 0xC129e7917b7c7DeDfAa5Fff1FB18d5D7050fE8ca
IEXEC_TEE_WORKER_PRE_COMPUTE_IMAGE: docker.io/iexechub/tee-worker-pre-compute:7.1.0-sconify-5.3.15-debug
IEXEC_TEE_WORKER_PRE_COMPUTE_FINGERPRINT: 9f0f782d6edc611baa23ca0978f555ee58ea70e092640c961e75c25e9e4b0f22
IEXEC_TEE_WORKER_PRE_COMPUTE_HEAP_SIZE_GB: 4
IEXEC_TEE_WORKER_POST_COMPUTE_IMAGE: docker.io/iexechub/tee-worker-post-compute:7.1.1-sconify-5.3.15-debug
IEXEC_TEE_WORKER_POST_COMPUTE_FINGERPRINT: face1376b97131e2dc75a556381d47a2e03bed9e1bc11e462471f99d1eefae50
IEXEC_TEE_WORKER_POST_COMPUTE_HEAP_SIZE_GB: 4
IEXEC_IGNORED_SGX_ADVISORIES: INTEL-SA-00161,INTEL-SA-00289,INTEL-SA-00334,INTEL-SA-00381,INTEL-SA-00389,INTEL-SA-00220,INTEL-SA-00270,INTEL-SA-00293,INTEL-SA-00320,INTEL-SA-00329,INTEL-SA-00477
IEXEC_SCONE_TOLERATED_INSECURE_OPTIONS: debug-mode,hyperthreading,outdated-tcb
IEXEC_SMS_DISPLAY_DEBUG_SESSION: true
IEXEC_SCONE_CAS_HOST: foo
IEXEC_SMS_IMAGE_LAS_IMAGE: foo
depends_on:
- token-chain
- name: token-sms-gramine
image: iexechub/iexec-sms:7.1.0
pull: always
commands:
- sleep 10
- java -jar /app/iexec-sms.jar
environment:
TZ: Europe/Paris
IEXEC_SMS_BLOCKCHAIN_NODE_ADDRESS: http://token-chain:8545
IEXEC_HUB_ADDRESS: 0xC129e7917b7c7DeDfAa5Fff1FB18d5D7050fE8ca
IEXEC_TEE_WORKER_PRE_COMPUTE_IMAGE: docker.io/iexechub/tee-worker-pre-compute:7.1.0-sconify-5.3.15-debug
IEXEC_TEE_WORKER_PRE_COMPUTE_FINGERPRINT: 9f0f782d6edc611baa23ca0978f555ee58ea70e092640c961e75c25e9e4b0f22
IEXEC_TEE_WORKER_PRE_COMPUTE_HEAP_SIZE_GB: 4
IEXEC_TEE_WORKER_POST_COMPUTE_IMAGE: docker.io/iexechub/tee-worker-post-compute:7.1.1-sconify-5.3.15-debug
IEXEC_TEE_WORKER_POST_COMPUTE_FINGERPRINT: face1376b97131e2dc75a556381d47a2e03bed9e1bc11e462471f99d1eefae50
IEXEC_TEE_WORKER_POST_COMPUTE_HEAP_SIZE_GB: 4
IEXEC_IGNORED_SGX_ADVISORIES: INTEL-SA-00161,INTEL-SA-00289,INTEL-SA-00334,INTEL-SA-00381,INTEL-SA-00389,INTEL-SA-00220,INTEL-SA-00270,INTEL-SA-00293,INTEL-SA-00320,INTEL-SA-00329,INTEL-SA-00477
IEXEC_SCONE_TOLERATED_INSECURE_OPTIONS: debug-mode,hyperthreading,outdated-tcb
IEXEC_SMS_DISPLAY_DEBUG_SESSION: true
IEXEC_SCONE_CAS_HOST: foo
IEXEC_SMS_IMAGE_LAS_IMAGE: foo
depends_on:
- token-chain
- name: ipfs
image: ipfs/go-ipfs:v0.9.1
pull: always
- name: token-result-proxy-mongo
pull: always
image: library/mongo:4.2
commands:
- mongod --bind_ip_all
- name: token-result-proxy
image: iexechub/iexec-result-proxy:7.1.0
pull: always
commands:
- sleep 10
- java -Djava.security.egd=file:/dev/./urandom -jar /iexec-result-proxy.jar
environment:
IEXEC_PRIVATE_CHAIN_ADDRESS: http://token-chain:8545
IEXEC_PUBLIC_CHAIN_ADDRESS: http://token-chain:8545
IEXEC_HUB_ADDRESS: 0xC129e7917b7c7DeDfAa5Fff1FB18d5D7050fE8ca
MONGO_HOST: token-result-proxy-mongo
MONGO_PORT: 27017
IEXEC_IPFS_HOST: ipfs
depends_on:
- ipfs
- token-chain
- token-result-proxy-mongo
- name: gateway-mongo
image: mongo:latest
pull: always
- name: gateway-redis
image: redis:alpine
pull: always
commands:
- redis-server --appendonly yes
- name: token-watcher
image: iexechub/iexec-market-watcher:6.3
pull: always
commands:
- sleep 10
- cd /app
- npm start
environment:
CHAIN: DEV
CHAIN_ID: 65535
IEXEC_ADDRESS: 0xC129e7917b7c7DeDfAa5Fff1FB18d5D7050fE8ca
ETH_WS_HOST: ws://token-chain:8546
ETH_RPC_HOST: http://token-chain:8545
MONGO_HOST: gateway-mongo
REDIS_HOST: gateway-redis
depends_on:
- token-chain
- gateway-mongo
- gateway-redis
- name: token-gateway
image: iexechub/iexec-market-api:6.3
pull: always
commands:
- sleep 10
- cd /app
- npm start
environment:
CHAINS: DEV
DEV_NATIVE: false
DEV_ETH_RPC_HOST: http://token-chain:8545
DEV_CHAIN_ID: 65535
DEV_IEXEC_ADDRESS: 0xC129e7917b7c7DeDfAa5Fff1FB18d5D7050fE8ca
MONGO_HOST: gateway-mongo
REDIS_HOST: gateway-redis
RATE_LIMIT_MAX: 10000
RATE_LIMIT_PERIOD: 60000
MAX_OPEN_ORDERS_PER_WALLET: 1000
depends_on:
- token-chain
- gateway-mongo
- gateway-redis
---
kind: pipeline
type: docker
name: publish dry-run
trigger:
event:
exclude:
- promote
steps:
- name: install
image: node:18
pull: always
commands:
- node -v
- npm -v
- npm ci
- name: build
image: node:18
commands:
- npm run build
- name: npm publish dry-run
image: node:18
commands:
- npm publish --dry-run
- name: docker publish dry-run
image: plugins/docker
pull: always
settings:
repo: iexechub/iexec-sdk
dockerfile: Dockerfile
dry_run: true
---
kind: pipeline
type: docker
name: publish nightly
trigger:
event:
- promote
target:
- nightly
branch:
- next
- new
steps:
- name: install
image: node:18
pull: always
commands:
- node -v
- npm -v
- npm ci
- name: build
image: node:18
commands:
- npm run build
- name: set version nightly
image: node:18
commands:
- eval npm pkg set version="$(npm pkg get version)-nightly-$DRONE_COMMIT"
- name: npm publish
image: plugins/npm
pull: always
settings:
username:
from_secret: npm_username
token:
from_secret: npm_token
tag: ${DRONE_BRANCH}
- name: docker publish
image: plugins/docker
pull: always
settings:
registry: docker-regis.iex.ec
repo: docker-regis.iex.ec/iexec-sdk
dockerfile: Dockerfile
username:
from_secret: nexus-user
password:
from_secret: nexus-password
tags:
- ${DRONE_BRANCH}
- ${DRONE_BRANCH}-${DRONE_COMMIT}
---
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: install
image: node:18
pull: always
commands:
- node -v
- npm -v
- npm ci
- name: build
image: node:18
commands:
- npm run build
- name: npm publish
image: plugins/npm
pull: always
settings:
username:
from_secret: npm_username
token:
from_secret: npm_token
tag: latest
- name: docker publish
image: plugins/docker
pull: always
settings:
repo: iexechub/iexec-sdk
dockerfile: Dockerfile
tags:
- latest
- ${DRONE_TAG##v}
username:
from_secret: docker_username
password:
from_secret: docker_password