@@ -68,6 +68,14 @@ executors:
68
68
# Command Definitions
69
69
# https://circleci.com/docs/2.0/reusing-config/#authoring-reusable-commands
70
70
commands :
71
+ fail_fast :
72
+ steps :
73
+ - run :
74
+ name : ' Cancel workflow on fail'
75
+ when : on_fail
76
+ command : |
77
+ curl -X POST --header "Content-Type: application/json" "https://circleci.com/api/v2/workflow/${CIRCLE_WORKFLOW_ID}/cancel?circle-token=${CIRCLE_TOKEN}"
78
+
71
79
custom_attach_workspace :
72
80
description : Attach workspace at a predefined location
73
81
steps :
@@ -148,12 +156,14 @@ jobs:
148
156
key : *cache_key
149
157
paths :
150
158
- ~/.cache/yarn
159
+ - fail_fast
151
160
152
161
lint :
153
162
executor : action-executor
154
163
steps :
155
164
- custom_attach_workspace
156
165
- run : yarn lint
166
+ - fail_fast
157
167
158
168
validate :
159
169
executor : action-executor
@@ -178,6 +188,7 @@ jobs:
178
188
command : yarn ts-circular-deps:check
179
189
- run :
180
190
command : yarn -s admin validate
191
+ - fail_fast
181
192
182
193
e2e-cli :
183
194
parameters :
@@ -207,6 +218,7 @@ jobs:
207
218
command : |
208
219
mkdir /mnt/ramdisk/e2e-yarn
209
220
node ./tests/legacy-cli/run_e2e --nb-shards=${CIRCLE_NODE_TOTAL} --shard=${CIRCLE_NODE_INDEX} <<# parameters.snapshots >>--ng-snapshots<</ parameters.snapshots >> --yarn --tmpdir=/mnt/ramdisk/e2e-yarn --glob="{tests/basic/**,tests/update/**,tests/commands/add/**}"
221
+ - fail_fast
210
222
211
223
test-browsers :
212
224
executor :
@@ -232,12 +244,14 @@ jobs:
232
244
- run : node ./tests/legacy-cli/run_e2e ./tests/legacy-cli/e2e/tests/misc/browsers.ts --ve
233
245
- run : node ./tests/legacy-cli/run_e2e ./tests/legacy-cli/e2e/tests/misc/browsers.ts
234
246
- run : ./scripts/saucelabs/stop-tunnel.sh
247
+ - fail_fast
235
248
236
249
build :
237
250
executor : action-executor
238
251
steps :
239
252
- custom_attach_workspace
240
253
- run : yarn build
254
+ - fail_fast
241
255
242
256
test :
243
257
executor : test-executor
@@ -250,6 +264,7 @@ jobs:
250
264
- run :
251
265
command : yarn bazel:test
252
266
no_output_timeout : 20m
267
+ - fail_fast
253
268
254
269
snapshot_publish :
255
270
executor : action-executor
@@ -267,6 +282,7 @@ jobs:
267
282
name : Deployment to Snapshot
268
283
command : |
269
284
yarn admin snapshots --verbose --githubTokenFile=${HOME}/github_token
285
+ - fail_fast
270
286
271
287
# Windows jobs
272
288
e2e-cli-win :
@@ -292,6 +308,7 @@ jobs:
292
308
} else {
293
309
node tests\legacy-cli\run_e2e.js --nb-shards=$env:CIRCLE_NODE_TOTAL --shard=$env:CIRCLE_NODE_INDEX
294
310
}
311
+ - fail_fast
295
312
296
313
workflows :
297
314
version : 2
@@ -320,7 +337,7 @@ workflows:
320
337
name : e2e-cli-ng-snapshots
321
338
snapshots : true
322
339
requires :
323
- - e2e-cli
340
+ - build
324
341
filters :
325
342
branches :
326
343
only :
@@ -331,7 +348,7 @@ workflows:
331
348
nodeversion : ' 12.20'
332
349
<< : *only_release_branches
333
350
requires :
334
- - e2e-cli
351
+ - build
335
352
- test-browsers :
336
353
requires :
337
354
- build
@@ -347,7 +364,7 @@ workflows:
347
364
# Windows jobs
348
365
- e2e-cli-win :
349
366
requires :
350
- - test
367
+ - build
351
368
352
369
# Publish jobs
353
370
- snapshot_publish :
0 commit comments