@@ -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.9"
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.ve >>--ve<</ parameters.ve >> <<# 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.16"
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
@@ -231,7 +239,7 @@ jobs:
231
239
build :
232
240
executor : action-executor
233
241
steps :
234
- - attach_workspace : *attach_options
242
+ - custom_attach_workspace
235
243
- run : yarn build
236
244
237
245
# This is where we put all the misbehaving and flaky tests so we can fine-tune their conditions
@@ -240,7 +248,7 @@ jobs:
240
248
executor : test-executor
241
249
resource_class : medium
242
250
steps :
243
- - attach_workspace : *attach_options
251
+ - custom_attach_workspace
244
252
- run : yarn webdriver-update
245
253
- run : yarn test-large --full --flakey
246
254
- run : yarn test-large --full --flakey --ve=true
@@ -249,15 +257,15 @@ jobs:
249
257
executor : action-executor
250
258
resource_class : xlarge
251
259
steps :
252
- - attach_workspace : *attach_options
260
+ - custom_attach_workspace
253
261
- setup_bazel_rbe
254
262
- run : sudo cp .circleci/bazel.rc /etc/bazel.bazelrc
255
263
- run : yarn bazel:test
256
264
257
265
snapshot_publish :
258
266
executor : action-executor
259
267
steps :
260
- - attach_workspace : *attach_options
268
+ - custom_attach_workspace
261
269
- run :
262
270
name : Decrypt Credentials
263
271
# Note: when changing the image, you might have to re-encrypt the credentials with a
@@ -273,7 +281,7 @@ jobs:
273
281
publish :
274
282
executor : action-executor
275
283
steps :
276
- - attach_workspace : *attach_options
284
+ - custom_attach_workspace
277
285
- run :
278
286
name : Decrypt Credentials
279
287
command : |
@@ -289,7 +297,7 @@ jobs:
289
297
setup-and-build-win :
290
298
executor : windows-executor
291
299
steps :
292
- - attach_workspace : *attach_options
300
+ - custom_attach_workspace
293
301
- setup_windows
294
302
- restore_cache :
295
303
keys :
@@ -305,14 +313,14 @@ jobs:
305
313
# Only jobs downstream from this one will see the updated workspace
306
314
# https://circleci.com/blog/deep-diving-into-circleci-workspaces/
307
315
- persist_to_workspace :
308
- root : .
316
+ root : *workspace_location
309
317
paths :
310
318
- ./*
311
319
312
320
test-win :
313
321
executor : windows-executor
314
322
steps :
315
- - attach_workspace : *attach_options
323
+ - custom_attach_workspace
316
324
- setup_windows
317
325
- run : yarn test --full
318
326
# Run partial e2e suite on PRs only. Master will run the full e2e suite with sharding.
0 commit comments