-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.drone.yml
207 lines (186 loc) · 3.83 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
---
kind: pipeline
name: tests
platform:
os: linux
arch: amd64
steps:
- name: prettier_project
pull: always
image: gcr.io/kosu-io/node-ci:latest
commands:
- yarn prettier:ci
- name: build-project
pull: always
image: gcr.io/kosu-io/node-ci:latest
commands:
- yarn
- yarn setup:ci
- yarn migrate:ci
- WEB3_URI=http://go-kosu-ci-geth:8545 yarn migrate:ci
environment:
WEB3_URI: http://kosu-geth:8545
WEB3_URI_WS: ws://kosu-geth:8546
volumes:
- name: node_modules
path: /drone/src/node_modules
- name: cache
path: /root/.cache
- name: gomod
path: /home/go/pkg/mod
- name: npm-tests
pull: always
image: gcr.io/kosu-io/node-ci:latest
commands:
- yarn test:ci
environment:
WEB3_URI: http://kosu-geth:8545
WEB3_URI_WS: ws://kosu-geth:8546
volumes:
- name: node_modules
path: /drone/src/node_modules
depends_on:
- build-project
- name: solidity
pull: always
image: gcr.io/kosu-io/node-ci:latest
commands:
- yarn contracts:test:ci
environment:
WEB3_URI: http://kosu-geth:8545
WEB3_URI_WS: ws://kosu-geth:8546
volumes:
- name: node_modules
path: /drone/src/node_modules
depends_on:
- build-project
- npm-tests
- name: kosu-node-0
pull: always
image: gcr.io/kosu-io/go-kosu-ci:latest
detach: true
commands:
- cd packages/go-kosu
- ./kosud start -H ./testnet/node0 -E ws://go-kosu-ci-geth:8546
depends_on:
- build-project
- name: kosu-node-1
pull: always
image: gcr.io/kosu-io/go-kosu-ci:latest
detach: true
commands:
- cd packages/go-kosu
- ./kosud start -H ./testnet/node1 -E ws://go-kosu-ci-geth:8546
depends_on:
- build-project
- name: kosu-node-2
pull: always
image: gcr.io/kosu-io/go-kosu-ci:latest
detach: true
commands:
- cd packages/go-kosu
- ./kosud start -H ./testnet/node2 -E ws://go-kosu-ci-geth:8546
depends_on:
- build-project
- name: kosu-node-3
pull: always
image: gcr.io/kosu-io/go-kosu-ci:latest
detach: true
commands:
- cd packages/go-kosu
- ./kosud start -H ./testnet/node3 -E ws://go-kosu-ci-geth:8546
depends_on:
- build-project
- name: go-kosu
pull: always
image: gcr.io/kosu-io/go-kosu-ci:latest
commands:
- cd packages/go-kosu
- export KOSU_TEST_NODES=$(pwd)/testnet/node0@kosu-node-1:26657,$(pwd)/testnet/node1@kosu-node-1:26657,$(pwd)/testnet/node2@kosu-node-1:26657,$(pwd)/testnet/node3@kosu-node-1:26657
- make ci
volumes:
- name: gomod
path: /go/pkg/mod
- name: cache
path: /root/.cache
depends_on:
- build-project
- kosu-node-0
- kosu-node-1
- kosu-node-2
- kosu-node-3
services:
- name: kosu-geth
pull: always
image: gcr.io/kosu-io/kosu-test-geth:latest
ports:
- 8545
- 8546
- name: go-kosu-ci-geth
pull: always
image: gcr.io/kosu-io/kosu-test-geth:latest
ports:
- 8545
- 8546
volumes:
- name: node_modules
host:
path: /tmp/drone/kosu/node_modules
- name: gomod
host:
path: /tmp/drone/kosu/gomod
- name: cache
host:
path: /tmp/drone/kosu/cache
trigger:
event:
- pull_request
- tag
---
kind: pipeline
name: release
platform:
os: linux
arch: amd64
steps:
- name: release
pull: always
image: gcr.io/kosu-io/node-ci:latest
commands:
- yarn
- yarn build
- yarn prettier
- npm-cli-login
- git checkout .
- yarn lerna publish from-package --yes
environment:
NPM_EMAIL:
from_secret: npm_email
NPM_PASS:
from_secret: npm_password
NPM_USER:
from_secret: npm_user
when:
event:
- tag
status:
- success
- name: gorelease
pull: always
image: gcr.io/kosu-io/go-kosu
commands:
- git fetch --tags
- cd ./packages/go-kosu
- curl -sL https://git.io/goreleaser | bash -s -- --skip-validate
environment:
GITHUB_TOKEN:
from_secret: github_token
when:
ref:
- refs/tags/@kosu/go-kosu*
trigger:
event:
- tag
depends_on:
- tests
...