Skip to content

Commit 211124e

Browse files
committed
refactor: streamline CI configuration and improve service definitions
1 parent 3f18427 commit 211124e

File tree

2 files changed

+236
-320
lines changed

2 files changed

+236
-320
lines changed

.drone.yml

Lines changed: 0 additions & 274 deletions
Original file line numberDiff line numberDiff line change
@@ -1,277 +1,3 @@
1-
kind: pipeline
2-
type: docker
3-
name: default
4-
5-
trigger:
6-
event:
7-
exclude:
8-
- promote
9-
- pull_request
10-
11-
steps:
12-
##### START LOCAL STACK #####
13-
14-
- name: sms
15-
image: iexechub/iexec-sms:8.7.0
16-
detach: true
17-
environment:
18-
JAVA_TOOL_OPTIONS: '-Xmx256M'
19-
IEXEC_SMS_BLOCKCHAIN_NODE_ADDRESS: http://bellecour-fork:8545
20-
IEXEC_HUB_ADDRESS: '0x3eca1B216A7DF1C7689aEb259fFB83ADFB894E7f'
21-
IEXEC_SMS_TEE_RUNTIME_FRAMEWORK: scone
22-
IEXEC_SMS_IMAGE_LAS_IMAGE: 'las-image'
23-
IEXEC_TEE_WORKER_PRE_COMPUTE_IMAGE: 'pre-compute-image'
24-
IEXEC_TEE_WORKER_PRE_COMPUTE_FINGERPRINT: 'pre-compute-fingerprint'
25-
IEXEC_TEE_WORKER_POST_COMPUTE_IMAGE: 'post-compute-image'
26-
IEXEC_TEE_WORKER_POST_COMPUTE_FINGERPRINT: 'post-compute-fingerprint'
27-
expose:
28-
- 13300
29-
depends_on:
30-
- bellecour-fork-healthy
31-
32-
- name: sms-healthy
33-
image: bash
34-
commands:
35-
- while ! nc -z sms 13300 ; do sleep 1 ; done && echo "sms ready"
36-
depends_on:
37-
- sms
38-
39-
- name: sms-gramine
40-
image: iexechub/iexec-sms:8.7.0
41-
detach: true
42-
environment:
43-
JAVA_TOOL_OPTIONS: '-Xmx256M'
44-
IEXEC_SMS_BLOCKCHAIN_NODE_ADDRESS: http://bellecour-fork:8545
45-
IEXEC_HUB_ADDRESS: '0x3eca1B216A7DF1C7689aEb259fFB83ADFB894E7f'
46-
IEXEC_SMS_TEE_RUNTIME_FRAMEWORK: scone
47-
IEXEC_SMS_IMAGE_LAS_IMAGE: 'las-image'
48-
IEXEC_TEE_WORKER_PRE_COMPUTE_IMAGE: 'pre-compute-image'
49-
IEXEC_TEE_WORKER_PRE_COMPUTE_FINGERPRINT: 'pre-compute-fingerprint'
50-
IEXEC_TEE_WORKER_POST_COMPUTE_IMAGE: 'post-compute-image'
51-
IEXEC_TEE_WORKER_POST_COMPUTE_FINGERPRINT: 'post-compute-fingerprint'
52-
expose:
53-
- 13300
54-
depends_on:
55-
- bellecour-fork-healthy
56-
57-
- name: sms-gramine-healthy
58-
image: bash
59-
commands:
60-
- while ! nc -z sms-gramine 13300 ; do sleep 1 ; done && echo "sms ready"
61-
depends_on:
62-
- sms
63-
64-
- name: result-proxy
65-
image: iexechub/iexec-result-proxy:7.1.0
66-
detach: true
67-
environment:
68-
IEXEC_PRIVATE_CHAIN_ADDRESS: http://bellecour-fork:8545
69-
IEXEC_PUBLIC_CHAIN_ADDRESS: http://bellecour-fork:8545
70-
IEXEC_HUB_ADDRESS: '0x3eca1B216A7DF1C7689aEb259fFB83ADFB894E7f'
71-
MONGO_HOST: result-proxy-mongo
72-
MONGO_PORT: 13202
73-
IEXEC_IPFS_HOST: ipfs
74-
expose:
75-
- 13200
76-
depends_on:
77-
- bellecour-fork-healthy
78-
- ipfs-healthy
79-
- result-proxy-mongo-healthy
80-
81-
- name: result-proxy-healthy
82-
image: bash
83-
commands:
84-
- while ! nc -z result-proxy 13200 ; do sleep 1 ; done && echo "result-proxy ready"
85-
depends_on:
86-
- result-proxy
87-
88-
- name: market-watcher
89-
image: iexechub/iexec-market-watcher:6.4
90-
detach: true
91-
environment:
92-
CHAIN: BELLECOUR
93-
ETH_WS_HOST: ws://bellecour-fork:8545
94-
ETH_RPC_HOST: http://bellecour-fork:8545
95-
MONGO_HOST: market-mongo
96-
REDIS_HOST: market-redis
97-
commands:
98-
- export START_BLOCK=$(cat local-stack-env/BELLECOUR_FORK_BLOCK)
99-
- cd /app
100-
- npm start
101-
depends_on:
102-
- prepare-local-stack-env
103-
- bellecour-fork-healthy
104-
- market-redis-healthy
105-
- market-mongo-healthy
106-
107-
- name: market-api
108-
image: iexechub/iexec-market-api:6.4
109-
detach: true
110-
expose:
111-
- 3000
112-
environment:
113-
CHAINS: BELLECOUR_FORK
114-
BELLECOUR_FORK_ETH_RPC_HOST: http://bellecour-fork:8545
115-
BELLECOUR_FORK_CHAIN_ID: 134
116-
BELLECOUR_FORK_IS_NATIVE: 'true'
117-
BELLECOUR_FORK_IEXEC_ADDRESS: '0x3eca1B216A7DF1C7689aEb259fFB83ADFB894E7f'
118-
MONGO_HOST: market-mongo
119-
REDIS_HOST: market-redis
120-
RATE_LIMIT_MAX: 10000
121-
RATE_LIMIT_PERIOD: 60000
122-
MAX_OPEN_ORDERS_PER_WALLET: 1000
123-
depends_on:
124-
- bellecour-fork-healthy
125-
- market-redis-healthy
126-
- market-mongo-healthy
127-
128-
- name: market-api-healthy
129-
image: bash
130-
commands:
131-
- while ! nc -z market-api 3000 ; do sleep 1 ; done && echo "market-api ready"
132-
depends_on:
133-
- market-api
134-
- market-watcher
135-
136-
- name: voucher-subgraph-deployer
137-
# https://github.com/iExecBlockchainComputing/iexec-voucher-subgraph
138-
image: iexechub/voucher-subgraph-deployer:1.0.0
139-
pull: always
140-
environment:
141-
RPC_URL: http://bellecour-fork:8545
142-
GRAPHNODE_URL: http://graphnode:8020
143-
IPFS_URL: http://ipfs:5001
144-
VOUCHER_HUB_ADDRESS: '0x3137B6DF4f36D338b82260eDBB2E7bab034AFEda'
145-
commands:
146-
- export VOUCHER_HUB_START_BLOCK=$(cat local-stack-env/BELLECOUR_FORK_BLOCK)
147-
- cd /iexec-voucher-subgraph && npm run all
148-
depends_on:
149-
- bellecour-fork-healthy
150-
- ipfs-healthy
151-
- graphnode-healthy
152-
153-
- name: custom-token-chain
154-
detach: true
155-
image: 'iexechub/poco-chaintest:5.3.2-token-openethereum'
156-
expose:
157-
- 8545
158-
159-
- name: custom-token-chain-healthy
160-
image: bash
161-
commands:
162-
- while ! nc -z custom-token-chain 8545 ; do sleep 1 ; done && echo "custom-token-chain ready"
163-
depends_on:
164-
- custom-token-chain
165-
166-
- name: stack-ready
167-
image: bash
168-
commands:
169-
- echo "all services ready"
170-
depends_on:
171-
- bellecour-fork-healthy
172-
- sms-healthy
173-
- sms-gramine-healthy
174-
- result-proxy-healthy
175-
- market-api-healthy
176-
- ipfs-healthy
177-
- graphnode-healthy
178-
- custom-token-chain-healthy
179-
- voucher-subgraph-deployer
180-
181-
### START LOCAL STACK END ###
182-
183-
- name: install
184-
image: node:18
185-
pull: always
186-
commands:
187-
- node -v
188-
- npm -v
189-
- npm ci
190-
191-
- name: build
192-
image: node:18
193-
pull: always
194-
commands:
195-
- npm run build
196-
depends_on:
197-
- install
198-
199-
- name: format
200-
image: node:18.19
201-
commands:
202-
- npm run check-format
203-
depends_on:
204-
- build
205-
206-
- name: lint
207-
image: node:18.19
208-
commands:
209-
- npm run lint
210-
depends_on:
211-
- build
212-
213-
- name: test
214-
image: node:18
215-
pull: always
216-
environment:
217-
ALCHEMY_API_KEY:
218-
from_secret: alchemy_api_key
219-
INFURA_PROJECT_ID:
220-
from_secret: infura_project_id
221-
ETHERSCAN_API_KEY:
222-
from_secret: etherscan_api_key
223-
commands:
224-
- apt update
225-
- apt install xxd
226-
- node -v
227-
- npm -v
228-
- npm -g install .
229-
- npm test
230-
depends_on:
231-
- build
232-
- stack-ready
233-
234-
- name: code analysis
235-
# issue with sonarsource/sonar-scanner-cli:latest
236-
# https://community.sonarsource.com/t/error-running-sonarsource-sonar-scanner-cli-latest/116539
237-
# 5.0.1 is working
238-
image: sonarsource/sonar-scanner-cli:5
239-
pull: always
240-
environment:
241-
SONAR_TOKEN:
242-
from_secret: sonar_token
243-
SONAR_HOST:
244-
from_secret: sonar_host
245-
commands:
246-
- sonar-scanner -Dsonar.host.url=$SONAR_HOST -Dsonar.branch.name=$DRONE_BRANCH
247-
depends_on:
248-
- test
249-
250-
- name: test node 20
251-
image: node:20
252-
pull: always
253-
environment:
254-
ALCHEMY_API_KEY:
255-
from_secret: alchemy_api_key
256-
INFURA_PROJECT_ID:
257-
from_secret: infura_project_id
258-
ETHERSCAN_API_KEY:
259-
from_secret: etherscan_api_key
260-
commands:
261-
- apt update
262-
- apt install xxd
263-
- node -v
264-
- npm -v
265-
- npm -g install .
266-
- npm test
267-
when:
268-
event:
269-
- tag
270-
depends_on:
271-
- build
272-
- stack-ready
273-
- test
274-
2751
---
2762
kind: pipeline
2773
type: docker

0 commit comments

Comments
 (0)