-
Notifications
You must be signed in to change notification settings - Fork 27.2k
feat(dev-infra): create shared platform for remote execution #41767
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
devversion
wants to merge
5
commits into
angular:master
from
devversion:build/use-own-platform-for-rbe
Closed
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
f05a9f8
feat(dev-infra): create shared platform for remote execution
devversion cb15eed
test(dev-infra): publish test should not rely on external http request
devversion efc368e
build: use platform from shared dev-infra package for remote execution
devversion 2f3c3bb
fixup! feat(dev-infra): create shared platform for remote execution
devversion df73c6b
fixup! feat(dev-infra): create shared platform for remote execution
devversion File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,5 +5,6 @@ filegroup( | |
| srcs = [ | ||
| "BUILD.bazel", | ||
| "expand_template.bzl", | ||
| "//dev-infra/bazel/remote-execution:files", | ||
| ], | ||
| ) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| package(default_visibility = ["//visibility:public"]) | ||
|
|
||
| platform( | ||
| name = "platform", | ||
| constraint_values = [ | ||
| "@bazel_tools//platforms:linux", | ||
| "@bazel_tools//platforms:x86_64", | ||
| "@bazel_tools//tools/cpp:clang", | ||
| ], | ||
| # We use a basic docker image from the Google Cloud container registry that supports | ||
| # browser tests. Note that we usually do not use any of the local browsers, but the image | ||
| # guarantees that necessary dependencies for launching browsers are installed. Since we | ||
| # do not rely on many binaries/tools from the image, the image doesn't need to be updated | ||
| # frequently. There are rare cases where it needs to be updated. e.g. for a more recent Bash | ||
| # version, or new system settings that are required for launching browsers. In order to do that, | ||
| # we need to either see if the `rbe-ubuntu16-04-webtest` image can be updated, or if we need to | ||
| # build and publish our own image to the Google cloud image registry. Additionally, we set th | ||
| # `SYS_ADMIN` capability so that browsers can be launched with sandbox mode enabled. Related | ||
| # information: https://developers.google.com/web/tools/puppeteer/troubleshooting#running_puppeteer_in_docker | ||
| remote_execution_properties = """ | ||
| properties: { | ||
| name: "container-image" | ||
| value:"docker://gcr.io/cloud-marketplace/google/rbe-ubuntu16-04-webtest@sha256:886a12dc4726f5b991b46386292afa8d943b6703a5496c8a1e07cfde778d9044" | ||
| } | ||
| properties: { | ||
| name: "dockerAddCapabilities" | ||
| value: "SYS_ADMIN" | ||
| } | ||
| """, | ||
| ) | ||
|
|
||
| filegroup( | ||
| name = "files", | ||
| srcs = [ | ||
| "BUILD.bazel", | ||
| "//dev-infra/bazel/remote-execution/cpp:files", | ||
| ], | ||
| ) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| load("@bazel_tools//tools/cpp:cc_toolchain_config.bzl", "cc_toolchain_config") | ||
|
|
||
| package(default_visibility = ["//visibility:public"]) | ||
|
|
||
| filegroup( | ||
| name = "files", | ||
| srcs = ["BUILD.bazel"], | ||
| ) | ||
|
|
||
| cc_toolchain_suite( | ||
| name = "cc_toolchain_suite", | ||
| toolchains = { | ||
| "k8": ":cc_compiler_k8", | ||
| }, | ||
| ) | ||
|
|
||
| toolchain( | ||
| name = "cc_toolchain", | ||
| exec_compatible_with = [ | ||
| "@bazel_tools//platforms:linux", | ||
| "@bazel_tools//platforms:x86_64", | ||
| "@bazel_tools//tools/cpp:clang", | ||
| ], | ||
| target_compatible_with = [ | ||
| "@bazel_tools//platforms:linux", | ||
| "@bazel_tools//platforms:x86_64", | ||
| ], | ||
| toolchain = ":cc_compiler_k8", | ||
| toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", | ||
| ) | ||
|
|
||
| # Basic CC toolchain for k8 remote containers. Based on the default k8 | ||
| # toolchain provided in Bazel (but unfortunately internal). | ||
| # https://github.com/bazelbuild/bazel/blob/c951753097b45cfb9be512c02199aa891b9646b8/tools/cpp/BUILD.tools#L298-L311 | ||
| cc_toolchain( | ||
| name = "cc_compiler_k8", | ||
| all_files = ":empty", | ||
| ar_files = ":empty", | ||
| as_files = ":empty", | ||
| compiler_files = ":empty", | ||
| dwp_files = ":empty", | ||
| linker_files = ":empty", | ||
| objcopy_files = ":empty", | ||
| strip_files = ":empty", | ||
| supports_param_files = 1, | ||
| toolchain_config = ":k8_toolchain_config", | ||
| toolchain_identifier = "cc-k8-compiler", | ||
| ) | ||
|
|
||
| cc_toolchain_config( | ||
| name = "k8_toolchain_config", | ||
| compiler = "compiler", | ||
| cpu = "local", | ||
| ) | ||
|
|
||
| # Empty filegroup used for defining the CC toolchain. | ||
| filegroup(name = "empty") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.