Skip to content

Commit 7970ce2

Browse files
committed
chore(ci): setup Remote Build Execution caching and Remote Build Event service
1 parent 8fe1ba7 commit 7970ce2

File tree

4 files changed

+48
-38
lines changed

4 files changed

+48
-38
lines changed

.circleci/base-rbe-bazelrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ build:remote --remote_executor=remotebuildexecution.googleapis.com
1212
build:remote --tls_enabled=true
1313
build:remote --auth_enabled=true
1414

15+
# Setup Build Event Service
16+
build:remote --bes_backend=buildeventservice.googleapis.com
17+
build:remote --bes_timeout=30s
18+
build:remote --bes_results_url="https://source.cloud.google.com/results/invocations/"
19+
1520
# Setup the toolchain and platform for the remote build execution. The platform
1621
# is automatically configured by the "rbe_autoconfig" rule in the project workpsace.
1722
build:remote --crosstool_top=@rbe_default//cc:toolchain

.circleci/bazel.rc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ import %workspace%/.circleci/base-rbe-bazelrc
1515

1616
# Use the Angular team internal GCP instance for remote execution.
1717
build:remote --remote_instance_name=projects/internal-200822/instances/default_instance
18+
build:remote --project_id=internal-200822
1819

19-
# We want to accept remote cached build artifacts to speed up our builds incrementally.
20-
# TODO(devversion): Temporary disabled since we don't have much insight on possible security
21-
# issues. Enable this once we investigated this further and talked to the RBE team.
22-
build:remote --remote_accept_cached=false
20+
# By default, do not accept remote cache, to be set to true for CI based on environment
21+
build:remote --remote_accept_cached=true

.circleci/config.yml

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -440,39 +440,39 @@ workflows:
440440
jobs:
441441
- bazel_build_test:
442442
filters: *ignore_presubmit_branch_filter
443-
- ivy_test:
444-
filters: *ignore_presubmit_branch_filter
445-
- api_golden_checks:
446-
filters: *ignore_presubmit_branch_filter
447-
448-
unit_tests:
449-
jobs:
450-
- tests_local_browsers:
451-
filters: *ignore_presubmit_branch_filter
452-
- tests_browserstack:
453-
filters: *ignore_presubmit_branch_filter
454-
- tests_saucelabs:
455-
filters: *ignore_presubmit_branch_filter
456-
457-
integration_tests:
458-
jobs:
459-
- e2e_tests:
460-
filters: *ignore_presubmit_branch_filter
461-
- prerender_build:
462-
filters: *ignore_presubmit_branch_filter
463-
464-
release_output:
465-
jobs:
466-
- build_release_packages:
467-
filters: *ignore_presubmit_branch_filter
468-
- build_devapp_aot:
469-
filters: *ignore_presubmit_branch_filter
470-
requires:
471-
- build_release_packages
472-
- publish_snapshots:
473-
filters: *publish_branches_filter
474-
requires:
475-
- build_release_packages
443+
#- ivy_test:
444+
# filters: *ignore_presubmit_branch_filter
445+
#- api_golden_checks:
446+
# filters: *ignore_presubmit_branch_filter
447+
448+
#unit_tests:
449+
# jobs:
450+
# - tests_local_browsers:
451+
# filters: *ignore_presubmit_branch_filter
452+
# - tests_browserstack:
453+
# filters: *ignore_presubmit_branch_filter
454+
# - tests_saucelabs:
455+
# filters: *ignore_presubmit_branch_filter
456+
#
457+
#integration_tests:
458+
# jobs:
459+
# - e2e_tests:
460+
# filters: *ignore_presubmit_branch_filter
461+
# - prerender_build:
462+
# filters: *ignore_presubmit_branch_filter
463+
#
464+
#release_output:
465+
# jobs:
466+
# - build_release_packages:
467+
# filters: *ignore_presubmit_branch_filter
468+
# - build_devapp_aot:
469+
# filters: *ignore_presubmit_branch_filter
470+
# requires:
471+
# - build_release_packages
472+
# - publish_snapshots:
473+
# filters: *publish_branches_filter
474+
# requires:
475+
# - build_release_packages
476476

477477
# Lint workflow. As we want to lint in one job, this is a workflow with just one job.
478478
lint:

scripts/circleci/bazel/setup-remote-execution.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,10 @@ openssl aes-256-cbc -d -in .circleci/gcp_token -md md5 -k ${GCP_DECRYPT_TOKEN} \
1616
echo "export GOOGLE_APPLICATION_CREDENTIALS=/home/.gcp_credentials" >> $BASH_ENV
1717

1818
# Update the CircleCI Bazel configuration to always use remote execution.
19-
echo 'build --config=remote' >> .circleci/bazel.rc
19+
echo "build --config=remote" >> .circleci/bazel.rc
20+
21+
if [[ -n "${CIRCLE_PR_NUMBER}" ]]; then
22+
echo "build --remote_upload_local_results=false" >> .circleci/bazel.rc
23+
else
24+
echo "build --remote_upload_local_results=true" >> .circleci/bazel.rc
25+
fi

0 commit comments

Comments
 (0)