@@ -138,6 +138,13 @@ var_20: &only_on_pull_requests_filter
138
138
only :
139
139
- /pull\/\d+/
140
140
141
+ # Anchor for a step that notifies Slack when preceding steps failed.
142
+ var_21 : &slack_notify_on_failure
143
+ run :
144
+ name : " Notifying team about job failure"
145
+ when : on_fail
146
+ command : ./scripts/notify-slack-job-failure.sh
147
+
141
148
# -----------------------------
142
149
# Container version of CircleCI
143
150
# -----------------------------
@@ -168,6 +175,7 @@ jobs:
168
175
# Exclude release and docs packages here as those will be built within
169
176
# the "build_release_packages" and "publish_snapshots" jobs.
170
177
- run : bazel build src/... --build_tag_filters=-docs-package,-release-package
178
+ - *slack_notify_on_failure
171
179
172
180
# -----------------------------------
173
181
# Job which ensures that all non-test Bazel targets build properly
@@ -189,6 +197,7 @@ jobs:
189
197
# Exclude release and docs packages here as those will be built within
190
198
# the "build_release_packages" and "publish_snapshots" jobs.
191
199
- run : bazel build src/... --build_tag_filters=-docs-package,-release-package --config=view-engine
200
+ - *slack_notify_on_failure
192
201
193
202
# --------------------------------------------------------------------------------------------
194
203
# Job that runs ts-api-guardian against our API goldens in "tools/public_api_guard".
@@ -208,6 +217,7 @@ jobs:
208
217
- *setup_bazel_binary
209
218
210
219
- run : bazel test tools/public_api_guard/...
220
+ - *slack_notify_on_failure
211
221
212
222
# -----------------------------------------------------------------
213
223
# Job that runs the e2e tests with Protractor and Chromium headless
@@ -226,6 +236,7 @@ jobs:
226
236
- *setup_bazel_binary
227
237
228
238
- run : bazel test src/... --build_tag_filters=e2e --test_tag_filters=e2e --build_tests_only
239
+ - *slack_notify_on_failure
229
240
230
241
# ------------------------------------------------------------------------------------------
231
242
# Job that runs the unit tests on locally installed browsers (Chrome and Firefox headless).
@@ -245,6 +256,7 @@ jobs:
245
256
- *setup_bazel_binary
246
257
247
258
- run : bazel test src/... --build_tag_filters=-e2e --test_tag_filters=-e2e --build_tests_only
259
+ - *slack_notify_on_failure
248
260
249
261
# ----------------------------------------------------------------------------
250
262
# Job that runs the unit tests on Browserstack. The browsers that will be used
@@ -263,6 +275,7 @@ jobs:
263
275
- *yarn_install
264
276
265
277
- run : ./scripts/circleci/run-browserstack-tests.sh
278
+ - *slack_notify_on_failure
266
279
267
280
# ----------------------------------------------------------------------------
268
281
# Job that runs the unit tests on Saucelabs. The browsers that will be used
@@ -284,6 +297,7 @@ jobs:
284
297
- *yarn_install
285
298
286
299
- run : ./scripts/circleci/run-saucelabs-tests.sh
300
+ - *slack_notify_on_failure
287
301
288
302
# ----------------------------------
289
303
# Lint job.
@@ -315,6 +329,7 @@ jobs:
315
329
- run : yarn tslint
316
330
- run : yarn -s ts-circular-deps:check
317
331
332
+ - *slack_notify_on_failure
318
333
- *save_cache
319
334
320
335
# -------------------------------------------------------------------------------------------
@@ -369,6 +384,7 @@ jobs:
369
384
- store_artifacts :
370
385
path : /tmp/cdk-umd-minified-bundles
371
386
destination : /angular_material/cdk_release_output/
387
+ - *slack_notify_on_failure
372
388
373
389
upload_release_packages :
374
390
<< : *job_defaults
@@ -411,8 +427,8 @@ jobs:
411
427
# as part of this job to the docs-content repository. It's not contained in the
412
428
# attached release output, so we need to build it here.
413
429
- run : bazel build src/components-examples:npm_package --config=release
414
-
415
430
- run : ./scripts/circleci/publish-snapshots.sh
431
+ - *slack_notify_on_failure
416
432
417
433
# -----------------------------------------------------------------
418
434
# Job that ensures that the release output is compatible with ngcc.
@@ -435,6 +451,7 @@ jobs:
435
451
# tsconfig parsing as that causes the release packages to be incorrectly resolved
436
452
# to the sources due to path mapping.
437
453
- run : yarn ngcc --error-on-failed-entry-point --no-tsconfig
454
+ - *slack_notify_on_failure
438
455
439
456
# -----------------------------------------------------------------
440
457
# Job that ensures that the release output is compatible with the
@@ -459,6 +476,7 @@ jobs:
459
476
# tsconfig parsing as that causes the release packages to be incorrectly resolved
460
477
# to the sources due to path mapping.
461
478
- run : yarn ngcc --error-on-failed-entry-point --no-tsconfig
479
+ - *slack_notify_on_failure
462
480
463
481
# ----------------------------------------------------------------------------
464
482
# Job that runs the local browser tests against the Angular Github snapshots
@@ -479,6 +497,7 @@ jobs:
479
497
- *setup_bazel_binary
480
498
481
499
- run : bazel test src/... --build_tag_filters=-e2e --test_tag_filters=-e2e --build_tests_only
500
+ - *slack_notify_on_failure
482
501
483
502
# ----------------------------------------------------------------------------
484
503
# Job that runs all Bazel tests against View Engine with the current Angular version
@@ -499,6 +518,7 @@ jobs:
499
518
500
519
# Run project tests with NGC and View Engine.
501
520
- run : bazel test src/... --build_tag_filters=-docs-package,-e2e --test_tag_filters=-e2e --config=view-engine --build_tests_only
521
+ - *slack_notify_on_failure
502
522
503
523
# ----------------------------------------------------------------------------
504
524
# Job that runs all Bazel tests against View Engine from angular/angular#master.
@@ -519,6 +539,7 @@ jobs:
519
539
520
540
# Run project tests with NGC and View Engine.
521
541
- run : bazel test src/... --build_tag_filters=-docs-package,-e2e --test_tag_filters=-e2e --config=view-engine --build_tests_only
542
+ - *slack_notify_on_failure
522
543
523
544
# ----------------------------------------------------------------------------
524
545
# Job that runs all Bazel integration tests.
@@ -537,6 +558,7 @@ jobs:
537
558
- *setup_bazel_binary
538
559
- run : yarn integration-tests
539
560
- run : yarn integration-tests:view-engine
561
+ - *slack_notify_on_failure
540
562
541
563
# ----------------------------------------------------------------------------
542
564
# Job that runs all Bazel tests against material-components-web@canary
@@ -560,6 +582,7 @@ jobs:
560
582
# Setup the components repository to use the MDC snapshot builds.
561
583
# Run project tests with the MDC canary builds.
562
584
- run : bazel test src/... --build_tag_filters=-docs-package,-e2e --test_tag_filters=-e2e --build_tests_only
585
+ - *slack_notify_on_failure
563
586
564
587
# ----------------------------------------------------------------------------------------
565
588
# Workflow definitions. A workflow usually groups multiple jobs together. This is useful if
0 commit comments