Add --config=remote option to build on the buildfarm cluster
Change-Id: Ied762d216f8717dfcb418b47b0519b0a6f1c2b06
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/.bazelrc b/.bazelrc
index 6642c31..be75aa1 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -97,10 +97,11 @@
build --sandbox_default_allow_network=false
build --incompatible_exclusive_test_sandboxed
-build --strategy=TsProject=sandboxed
-build --strategy=CopyFile=standalone
-build --strategy=CopyDirectory=standalone
-build --strategy=CopyToDirectory=standalone
+build --strategy=TsProject=remote,sandboxed
+build --strategy=CopyFile=remote,standalone
+build --strategy=CopyDirectory=remote,standalone
+build --strategy=CopyToDirectory=remote,standalone
+build --strategy=NpmLifecycleHook=remote,sandboxed,standalone
# Honor the setting of `skipLibCheck` in the tsconfig.json file.
# https://www.typescriptlang.org/tsconfig#skipLibCheck
@@ -124,6 +125,8 @@
# Prevent falling back to the host JDK.
startup --noautodetect_server_javabase
+common --experimental_repo_remote_exec
+
# Give each build action and test its own /tmp.
build --sandbox_tmpfs_path=/tmp
@@ -143,6 +146,17 @@
# Disable warnings about using directories in Bazel.
startup --host_jvm_args=-DBAZEL_TRACK_SOURCE_DIRECTORIES=1
+build --incompatible_strict_action_env --experimental_inmemory_dotd_files --experimental_inmemory_jdeps_files --experimental_remote_merkle_tree_cache --incompatible_allow_tags_propagation
+
+# Builds on the buildbarn cluster running in the datacenter. This will only
+# work inside the datacenter.
+build:remote --remote_executor=grpc://data-fast:8980
+build:remote --remote_timeout=1500
+build:remote --spawn_strategy=remote,linux-sandbox
+build:remote --grpc_keepalive_time=30s
+build:remote --remote_instance_name=fuse
+build:remote --verbose_failures
+
# Load a local file that users can use to customize bazel invocations. This
# should stay the last line in this file so users can override things when they
# want.
diff --git a/tools/platforms/BUILD b/tools/platforms/BUILD
index 6e73a8e..4749eeb 100644
--- a/tools/platforms/BUILD
+++ b/tools/platforms/BUILD
@@ -10,6 +10,10 @@
"//tools/platforms/nodejs:has_support",
"//tools/platforms/gpu:nvidia",
],
+ exec_properties = {
+ "container-image": "docker://docker.io/debian:bookworm",
+ "OSFamily": "linux",
+ },
)
platform(