/
githubmirror
/
components
Обзор
Документация
Войти
/
githubmirror
/
components
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
.bazelrc
141 строка
6 KB
Alan Agius
build: only include adev_assets in snapshot builds (#32470)
04 дек 2025, 13:52
Не верифицирован
04 дек 2025, 13:52
21f1b31
Код
Авторство
О чём код?
# Frozen lockfile common --lockfile_mode=error # Required by `rules_ts`. common --@aspect_rules_ts//ts:skipLibCheck=always common --@aspect_rules_ts//ts:default_to_tsc_transpiler # Needed as otherwise `env` of TS actions would be ignored. common --incompatible_merge_fixed_and_default_shell_env ############################### # Filesystem interactions # ############################### # Don't create bazel-* symlinks in the WORKSPACE directory. # These require .gitignore and may scare users. Also, it's a workaround for # https://github.com/bazelbuild/rules_typescript/issues/12 which affects the common case of # having `tsconfig.json` in the WORKSPACE directory. Instead, you should run # `bazel info output_base` to find out where the outputs went. build --symlink_prefix=dist/ # Performance: avoid stat'ing input files build --watchfs # Turn off legacy external runfiles build --nolegacy_external_runfiles run --nolegacy_external_runfiles test --nolegacy_external_runfiles # This flag is needed to so that the bazel cache is not invalidated # when running bazel via `pnpm bazel`. build --incompatible_strict_action_env # Do not build runfile forests by default. If an execution strategy relies on runfile # forests, the forest is created on-demand. See: https://github.com/bazelbuild/bazel/issues/6627 # and https://github.com/bazelbuild/bazel/commit/03246077f948f2790a83520e7dccc2625650e6df build --nobuild_runfile_links # Prevents the npm package extract from occuring or caching on RBE which overwhelms our quota build --modify_execution_info=NpmPackageExtract=+no-remote ############################### # Output control # ############################### # A more useful default output mode for bazel query # Prints eg. "ng_project rule //foo:bar" rather than just "//foo:bar" query --output=label_kind # By default, failing tests don't print any output, it goes to the log file test --test_output=errors #################################### # Stamping configurations. # # Run with "--config=release" or # # "--config=snapshot-build". # #################################### # Configures script to do version stamping. # See https://docs.bazel.build/versions/master/user-manual.html#flag--workspace_status_command build:release --workspace_status_command="pnpm -s ng-dev:stamp --mode=release" build:release --stamp build:snapshot-build --workspace_status_command="pnpm -s ng-dev:stamp --mode=snapshot" build:snapshot-build --stamp build:snapshot-build --//:enable_snapshot_adev_assets ################################ # Remote Execution Setup # ################################ # Use the Angular team internal GCP instance for remote execution. build:remote --remote_instance_name=projects/internal-200822/instances/primary_instance # Needed due to: https://github.com/bazelbuild/bazel/issues/7254 build:remote --define=EXECUTOR=remote # Since remote builds run within Google Cloud `k8`-based containers, we set the # host and target CPU accordingly. build:remote --cpu=k8 build:remote --host_cpu=k8 # Bazel detects maximum number of jobs based on host resources. # Since we run remotely, we can increase this number significantly. common:remote --jobs=200 # Setup the remote build execution servers. build:remote --remote_cache=remotebuildexecution.googleapis.com build:remote --remote_executor=remotebuildexecution.googleapis.com build:remote --google_default_credentials=true # Setup the toolchain and platform for the remote build execution. The platform # is provided by the shared dev-infra package and targets k8 remote containers. build:remote --extra_execution_platforms=@devinfra//bazel/remote-execution:platform_with_network build:remote --host_platform=@devinfra//bazel/remote-execution:platform_with_network build:remote --platforms=@devinfra//bazel/remote-execution:platform_with_network ################################ # Sandbox settings # ################################ # By default, network access should be disabled unless explicitly granted for certain targets # using the `requires-network` tag. https://docs.bazel.build/versions/main/be/common-definitions.html build --sandbox_default_allow_network=false test --sandbox_default_allow_network=false ################################ # --config=build-results # ################################ # Sets up Build Event Service if the `builds-results` configuration is used. We # do not upload build results by default as this makes us reliant on external servers # that could cause builds to fail unnecessarily. If desired, build result uploading # can be manually uploaded, but given that the build event service server has been # less stable than the remote executors, we do not want to degrade CI stability. build:build-results --bes_instance_name=internal-200822 build:build-results --bes_backend=buildeventservice.googleapis.com build:build-results --bes_timeout=60s build:build-results --bes_results_url="https://source.cloud.google.com/results/invocations/" # Set remote caching settings build:remote --remote_accept_cached=true build:remote --remote_upload_local_results=false # Additional flags added when running a "trusted build" with additional access build:trusted-build --remote_upload_local_results=true ################################ # --config=debug # ################################ # Enable debugging tests with --config=debug test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results ################################ # Local Environment Setup # # Needs to be last statement # ################################ # Load any settings which are specific to the current user. Needs to be *last* statement # in this config, as the user configuration should be able to overwrite flags from this file. try-import .bazelrc.user