treewide: Add remote execution support
This adds support for remote execution by adding a target to build
a sandbox OCI image.
Change-Id: I848f705b7ea7311e20945ee8676cc7a52c8c33aa
Reviewed-on: https://review.monogon.dev/c/monogon/+/3783
Reviewed-by: Leopold Schabel <leo@monogon.tech>
Tested-by: Jenkins CI
diff --git a/.bazelrc b/.bazelrc
index 1527f42..67b5edd 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -21,6 +21,14 @@
# Run race config with race detector
build:race --@io_bazel_rules_go//go/config:race
+# Only download the final result, the intermediate files can stay on the
+# server side.
+build:remote --remote_download_toplevel
+build:remote --noremote_upload_local_results
+
+# Set the execution platform which adds constraints for the scheduler.
+build:remote --extra_execution_platforms=//build/platforms:remote_amd64
+
# Force netgo and osusergo
build --@io_bazel_rules_go//go/config:tags=osusergo,netgo