Skip to content

Commit 417adf8

Browse files
devversionjelbourn
authored andcommitted
build: fix bazel not available if cache could not be restored (#16764)
Currently the `setup_bazel_binary` script always runs before the node modules are installed. This means that the the global bazel binary cannot be set up as the `@bazel/bazel` package is not installed yet. Due to CircleCI's caching (and fallback caching) we currently have a lot of cache hits that prevented this issue from showing up (until https://circleci.com/gh/angular/components/70351)
1 parent cf70c43 commit 417adf8

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

.circleci/config.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,11 @@ jobs:
145145
steps:
146146
- *checkout_code
147147
- *restore_cache
148-
- *setup_bazel_binary
149148
- *setup_bazel_ci_config
150149
- *setup_bazel_remote_execution
151150
- *yarn_download
152151
- *yarn_install
152+
- *setup_bazel_binary
153153

154154
- run: bazel build src/... --build_tag_filters=-docs-package
155155

@@ -165,11 +165,11 @@ jobs:
165165
steps:
166166
- *checkout_code
167167
- *restore_cache
168-
- *setup_bazel_binary
169168
- *setup_bazel_ci_config
170169
- *setup_bazel_remote_execution
171170
- *yarn_download
172171
- *yarn_install
172+
- *setup_bazel_binary
173173

174174
- run: bazel test tools/public_api_guard/...
175175

@@ -184,11 +184,11 @@ jobs:
184184
steps:
185185
- *checkout_code
186186
- *restore_cache
187-
- *setup_bazel_binary
188187
- *setup_bazel_ci_config
189188
- *setup_bazel_remote_execution
190189
- *yarn_download
191190
- *yarn_install
191+
- *setup_bazel_binary
192192

193193
- run: bazel test src/... --build_tag_filters=e2e --test_tag_filters=e2e
194194

@@ -204,11 +204,11 @@ jobs:
204204
steps:
205205
- *checkout_code
206206
- *restore_cache
207-
- *setup_bazel_binary
208207
- *setup_bazel_ci_config
209208
- *setup_bazel_remote_execution
210209
- *yarn_download
211210
- *yarn_install
211+
- *setup_bazel_binary
212212

213213
- run: bazel test src/... --build_tag_filters=-e2e --test_tag_filters=-e2e
214214

@@ -358,11 +358,11 @@ jobs:
358358
- *checkout_code
359359
- *restore_cache
360360
- *attach_release_output
361-
- *setup_bazel_binary
362361
- *setup_bazel_ci_config
363362
- *setup_bazel_remote_execution
364363
- *yarn_download
365364
- *yarn_install
365+
- *setup_bazel_binary
366366

367367
# CircleCI has a config setting to enforce SSH for all github connections.
368368
# This is not compatible with our mechanism of using a Personal Access Token
@@ -408,11 +408,11 @@ jobs:
408408
steps:
409409
- *checkout_code
410410
- *restore_cache
411-
- *setup_bazel_binary
412411
- *setup_bazel_ci_config
413412
- *setup_bazel_remote_execution
414413
- *yarn_download
415414
- *yarn_install
415+
- *setup_bazel_binary
416416

417417
# Setup Angular ivy snapshots built with ngtsc but locked to a specific tag. We
418418
# cannot determine the tag automatically based on the Angular version specified in
@@ -440,11 +440,11 @@ jobs:
440440
steps:
441441
- *checkout_code
442442
- *restore_cache
443-
- *setup_bazel_binary
444443
- *setup_bazel_ci_config
445444
- *setup_bazel_remote_execution
446445
- *yarn_download
447446
- *yarn_install
447+
- *setup_bazel_binary
448448

449449
# Setup Angular ivy snapshots built with ngtsc.
450450
- run: node ./scripts/circleci/setup-angular-snapshots.js --tag master-ivy-aot

0 commit comments

Comments
 (0)