@@ -21,8 +21,11 @@ var_2: &cache_key_fallback angular_devkit-0.11.0
21
21
var_1_win : &cache_key_win angular_devkit-win-0.11.0-{{ checksum "yarn.lock" }}
22
22
var_2_win : &cache_key_fallback_win angular_devkit-win-0.11.0
23
23
var_3 : &default_nodeversion "12.1"
24
- var_4 : &attach_options
25
- at : .
24
+ # Workspace initially persisted by the `setup` job, and then enhanced by `setup-and-build-win`.
25
+ # https://circleci.com/docs/2.0/workflows/#using-workspaces-to-share-data-among-jobs
26
+ # https://circleci.com/blog/deep-diving-into-circleci-workspaces/
27
+ var_4 : &workspace_location .
28
+ # Filter to ignore pull requests on a given job.
26
29
var_5 : &ignore_pull_requests
27
30
filters :
28
31
branches :
@@ -63,6 +66,11 @@ executors:
63
66
# Command Definitions
64
67
# https://circleci.com/docs/2.0/reusing-config/#authoring-reusable-commands
65
68
commands :
69
+ custom_attach_workspace :
70
+ description : Attach workspace at a predefined location
71
+ steps :
72
+ - attach_workspace :
73
+ at : *workspace_location
66
74
setup_windows :
67
75
steps :
68
76
- run :
@@ -123,7 +131,7 @@ jobs:
123
131
- *cache_key_fallback
124
132
- run : yarn install --frozen-lockfile
125
133
- persist_to_workspace :
126
- root : .
134
+ root : *workspace_location
127
135
paths :
128
136
- ./*
129
137
- save_cache :
@@ -134,7 +142,7 @@ jobs:
134
142
lint :
135
143
executor : action-executor
136
144
steps :
137
- - attach_workspace : *attach_options
145
+ - custom_attach_workspace
138
146
- run : yarn lint
139
147
- run : ' yarn bazel:format -mode=check ||
140
148
(echo "BUILD files not formatted. Please run '' yarn bazel:format'' " ; exit 1)'
@@ -145,13 +153,13 @@ jobs:
145
153
validate :
146
154
executor : action-executor
147
155
steps :
148
- - attach_workspace : *attach_options
156
+ - custom_attach_workspace
149
157
- run : yarn validate --ci
150
158
151
159
test :
152
160
executor : action-executor
153
161
steps :
154
- - attach_workspace : *attach_options
162
+ - custom_attach_workspace
155
163
- run : yarn test --full
156
164
157
165
test-large :
@@ -166,7 +174,7 @@ jobs:
166
174
resource_class : large
167
175
parallelism : 4
168
176
steps :
169
- - attach_workspace : *attach_options
177
+ - custom_attach_workspace
170
178
- run : yarn webdriver-update
171
179
- run : yarn test-large --full <<# parameters.ivy >>--ivy<</ parameters.ivy >> <<# parameters.glob >>--glob="<< parameters.glob >>"<</ parameters.glob >> --nb-shards=${CIRCLE_NODE_TOTAL} --shard=${CIRCLE_NODE_INDEX}
172
180
@@ -181,7 +189,7 @@ jobs:
181
189
executor : test-executor
182
190
parallelism : 4
183
191
steps :
184
- - attach_workspace : *attach_options
192
+ - custom_attach_workspace
185
193
- run :
186
194
name : Initialize Environment
187
195
command : ./.circleci/env.sh
@@ -195,7 +203,7 @@ jobs:
195
203
nodeversion : " 10.12"
196
204
parallelism : 4
197
205
steps :
198
- - attach_workspace : *attach_options
206
+ - custom_attach_workspace
199
207
- run :
200
208
name : Initialize Environment
201
209
command : |
@@ -210,7 +218,7 @@ jobs:
210
218
environment :
211
219
E2E_BROWSERS : true
212
220
steps :
213
- - attach_workspace : *attach_options
221
+ - custom_attach_workspace
214
222
- run :
215
223
name : Initialize Environment
216
224
command : ./.circleci/env.sh
@@ -230,15 +238,15 @@ jobs:
230
238
build :
231
239
executor : action-executor
232
240
steps :
233
- - attach_workspace : *attach_options
241
+ - custom_attach_workspace
234
242
- run : yarn build
235
243
236
244
# This is where we put all the misbehaving and flaky tests so we can fine-tune their conditions
237
245
# and rerun them faster.
238
246
flake-jail :
239
247
executor : action-executor
240
248
steps :
241
- - attach_workspace : *attach_options
249
+ - custom_attach_workspace
242
250
- run : yarn webdriver-update
243
251
- run : yarn test-large --full --flakey
244
252
- run : yarn test-large --full --flakey --ivy=true
@@ -247,15 +255,15 @@ jobs:
247
255
executor : action-executor
248
256
resource_class : xlarge
249
257
steps :
250
- - attach_workspace : *attach_options
258
+ - custom_attach_workspace
251
259
- setup_bazel_rbe
252
260
- run : sudo cp .circleci/bazel.rc /etc/bazel.bazelrc
253
261
- run : yarn bazel:test
254
262
255
263
snapshot_publish :
256
264
executor : action-executor
257
265
steps :
258
- - attach_workspace : *attach_options
266
+ - custom_attach_workspace
259
267
- run :
260
268
name : Decrypt Credentials
261
269
# Note: when changing the image, you might have to re-encrypt the credentials with a
@@ -271,7 +279,7 @@ jobs:
271
279
publish :
272
280
executor : action-executor
273
281
steps :
274
- - attach_workspace : *attach_options
282
+ - custom_attach_workspace
275
283
- run :
276
284
name : Decrypt Credentials
277
285
command : |
@@ -287,7 +295,7 @@ jobs:
287
295
setup-and-build-win :
288
296
executor : windows-executor
289
297
steps :
290
- - attach_workspace : *attach_options
298
+ - custom_attach_workspace
291
299
- setup_windows
292
300
- restore_cache :
293
301
keys :
@@ -303,14 +311,14 @@ jobs:
303
311
# Only jobs downstream from this one will see the updated workspace
304
312
# https://circleci.com/blog/deep-diving-into-circleci-workspaces/
305
313
- persist_to_workspace :
306
- root : .
314
+ root : *workspace_location
307
315
paths :
308
316
- ./*
309
317
310
318
test-win :
311
319
executor : windows-executor
312
320
steps :
313
- - attach_workspace : *attach_options
321
+ - custom_attach_workspace
314
322
- setup_windows
315
323
- run : yarn test --full
316
324
# Run partial e2e suite on PRs only. Master will run the full e2e suite with sharding.
0 commit comments