From 097fdffc916d450732abc3a6645ef94e9258cf94 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Thu, 22 Apr 2021 16:34:57 +0200 Subject: [PATCH] build: use platform from shared dev-infra package for remote execution (#41767) Uses the new shared RBE platform from the dev-infra package. PR Close #41767 --- .bazelrc | 14 +++++--------- WORKSPACE | 24 ------------------------ packages/bazel/package.bzl | 13 ------------- renovate.json | 1 - 4 files changed, 5 insertions(+), 47 deletions(-) diff --git a/.bazelrc b/.bazelrc index 6f7a24ff894..2647e1163d1 100644 --- a/.bazelrc +++ b/.bazelrc @@ -114,15 +114,11 @@ build:remote --cpu=k8 build:remote --host_cpu=k8 # Toolchain and platform related flags -build:remote --host_javabase=@rbe_ubuntu1604_angular//java:jdk -build:remote --javabase=@rbe_ubuntu1604_angular//java:jdk -build:remote --host_java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8 -build:remote --java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8 -build:remote --crosstool_top=@rbe_ubuntu1604_angular//cc:toolchain -build:remote --extra_toolchains=@rbe_ubuntu1604_angular//config:cc-toolchain -build:remote --extra_execution_platforms=//tools:rbe_ubuntu1604-angular -build:remote --host_platform=//tools:rbe_ubuntu1604-angular -build:remote --platforms=//tools:rbe_ubuntu1604-angular +build:remote --crosstool_top=//dev-infra/bazel/remote-execution/cpp:cc_toolchain_suite +build:remote --extra_toolchains=//dev-infra/bazel/remote-execution/cpp:cc_toolchain +build:remote --extra_execution_platforms=//dev-infra/bazel/remote-execution:platform +build:remote --host_platform=//dev-infra/bazel/remote-execution:platform +build:remote --platforms=//dev-infra/bazel/remote-execution:platform # Remote instance and caching build:remote --remote_instance_name=projects/internal-200822/instances/default_instance diff --git a/WORKSPACE b/WORKSPACE index 9a26981611e..674ee281791 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -62,27 +62,3 @@ sass_repositories() load("@io_bazel_skydoc//skylark:skylark.bzl", "skydoc_repositories") skydoc_repositories() - -load("@bazel_toolchains//rules:environments.bzl", "clang_env") -load("@bazel_toolchains//rules:rbe_repo.bzl", "rbe_autoconfig") - -rbe_autoconfig( - name = "rbe_ubuntu1604_angular", - # Need to specify a base container digest in order to ensure that we can use the checked-in - # platform configurations for the "ubuntu16_04" image. Otherwise the autoconfig rule would - # need to pull the image and run it in order determine the toolchain configuration. See: - # https://github.com/bazelbuild/bazel-toolchains/blob/4.0.0/configs/ubuntu16_04_clang/versions.bzl - base_container_digest = "sha256:f6568d8168b14aafd1b707019927a63c2d37113a03bcee188218f99bd0327ea1", - # Note that if you change the `digest`, you might also need to update the - # `base_container_digest` to make sure marketplace.gcr.io/google/rbe-ubuntu16-04-webtest: - # and marketplace.gcr.io/google/rbe-ubuntu16-04: have - # the same Clang and JDK installed. Clang is needed because of the dependency on - # @com_google_protobuf. Java is needed for the Bazel's test executor Java tool. - digest = "sha256:dddaaddbe07a61c2517f9b08c4977fc23c4968fcb6c0b8b5971e955d2de7a961", - env = clang_env(), - registry = "marketplace.gcr.io", - # We can't use the default "ubuntu16_04" RBE image provided by the autoconfig because we need - # a specific Linux kernel that comes with "libx11" in order to run headless browser tests. - repository = "google/rbe-ubuntu16-04-webtest", - use_checked_in_confs = "Force", -) diff --git a/packages/bazel/package.bzl b/packages/bazel/package.bzl index a2d475788db..64bad9c349e 100644 --- a/packages/bazel/package.bzl +++ b/packages/bazel/package.bzl @@ -24,19 +24,6 @@ def rules_angular_dev_dependencies(): shorter. """ - # Needed for Remote Execution - # https://github.com/bazelbuild/bazel-toolchains/releases - _maybe( - http_archive, - name = "bazel_toolchains", - sha256 = "1adf5db506a7e3c465a26988514cfc3971af6d5b3c2218925cd6e71ee443fc3f", - strip_prefix = "bazel-toolchains-4.0.0", - urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/releases/download/4.0.0/bazel-toolchains-4.0.0.tar.gz", - "https://github.com/bazelbuild/bazel-toolchains/releases/download/4.0.0/bazel-toolchains-4.0.0.tar.gz", - ], - ) - ############################################# # Dependencies for generating documentation # ############################################# diff --git a/renovate.json b/renovate.json index 6430b560046..6c901408c70 100644 --- a/renovate.json +++ b/renovate.json @@ -78,7 +78,6 @@ "packagePatterns": [ "^@bazel/.*", "^build_bazel.*", - "bazel_toolchains" ], "groupName": "bazel", "pinVersions": false