@@ -65,6 +65,29 @@ var_10: &attach_release_output
65
65
attach_workspace :
66
66
at : dist/releases
67
67
68
+
69
+ # Branch filter that we can specify for jobs that should only run on publish branches. This filter
70
+ # is used to ensure that not all upstream branches will be published as Github builds
71
+ # (e.g. revert branches, feature branches)
72
+ var_11 : &publish_branches_filter
73
+ branches :
74
+ only :
75
+ - master
76
+ # 6.0.x, 7.1.x, etc.
77
+ - /\d+\.\d+\.x/
78
+ # 6.x, 7.x, 8.x etc
79
+ - /\d+\.x/
80
+
81
+ # Branch filter that is usually applied to all jobs. Since there is no way within CircleCI to
82
+ # exclude a branch for all defined jobs, we need to manually specify the filters for each job.
83
+ # In order to reduce duplication we use a YAML anchor that just always excludes the "_presubmit"
84
+ # branch. We don't want to run Circle for the temporary "_presubmit" branch which is reserved
85
+ # for the caretaker.
86
+ var_12 : &ignore_presubmit_branch_filter
87
+ branches :
88
+ ignore :
89
+ - " _presubmit"
90
+
68
91
# -----------------------------
69
92
# Container version of CircleCI
70
93
# -----------------------------
@@ -308,34 +331,44 @@ workflows:
308
331
# that build and test source code should be part of this workflow
309
332
build_and_test :
310
333
jobs :
311
- - bazel_build_test
312
- - api_golden_checks
334
+ - bazel_build_test :
335
+ filters : *ignore_presubmit_branch_filter
336
+ - api_golden_checks :
337
+ filters : *ignore_presubmit_branch_filter
313
338
314
339
unit_tests :
315
340
jobs :
316
- - tests_local_browsers
317
- - tests_browserstack
318
- - tests_saucelabs
341
+ - tests_local_browsers :
342
+ filters : *ignore_presubmit_branch_filter
343
+ - tests_browserstack :
344
+ filters : *ignore_presubmit_branch_filter
345
+ - tests_saucelabs :
346
+ filters : *ignore_presubmit_branch_filter
319
347
320
348
integration_tests :
321
349
jobs :
322
- - e2e_tests
323
- - prerender_build
350
+ - e2e_tests :
351
+ filters : *ignore_presubmit_branch_filter
352
+ - prerender_build :
353
+ filters : *ignore_presubmit_branch_filter
324
354
325
355
release_output :
326
356
jobs :
327
357
- build_release_packages
328
358
- build_devapp_aot :
359
+ filters : *ignore_presubmit_branch_filter
329
360
requires :
330
361
- build_release_packages
331
362
- publish_snapshots :
363
+ filters : *publish_branches_filter
332
364
requires :
333
365
- build_release_packages
334
366
335
367
# Lint workflow. As we want to lint in one job, this is a workflow with just one job.
336
368
lint :
337
369
jobs :
338
- - lint
370
+ - lint :
371
+ filters : *ignore_presubmit_branch_filter
339
372
340
373
# Snapshot tests workflow that is scheduled to run all specified jobs at midnight everyday.
341
374
# This workflow runs various jobs against the Angular snapshot builds from Github.
@@ -355,15 +388,3 @@ workflows:
355
388
# it's not guaranteed that older versions of Angular Material always work
356
389
# with the latest Angular version.
357
390
- master
358
-
359
- # ---------------------------
360
- # General setup for CircleCI
361
- # ---------------------------
362
- general :
363
- branches :
364
- only :
365
- - master
366
- # 5.2.x, 6.0.x, etc
367
- - /\d+\.\d+\.x/
368
- # 5.x, 6.x, etc
369
- - /\d+\.x/
0 commit comments