-
Notifications
You must be signed in to change notification settings - Fork 67
Expand file tree
/
Copy pathBUILD.bazel
More file actions
39 lines (36 loc) · 2.18 KB
/
BUILD.bazel
File metadata and controls
39 lines (36 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
load(":index.bzl", "ENABLE_NETWORK")
package(default_visibility = ["//visibility:public"])
platform(
name = "platform",
constraint_values = [
"@platforms//os:linux",
"@platforms//cpu:x86_64",
],
exec_properties = {
# We use the official Puppeteer docker image that supports launching browsers. 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.
"container-image": "docker://us-west2-docker.pkg.dev/internal-200822/remote-execution-images/angular-devinfra-rbe-image@sha256:c853f16afdba9422f9e22548d32428a0b89e11987697c2aadd98dfa7977c7db1",
# By default in Google Cloud Remote build execution, network access is disabled. We explicitly set the
# property in the platform again in case the default ever changes. Network access is not desirable in
# Bazel builds as it is potential source of flaky tests and therefore also breaks hermeticity.
"dockerNetwork": "off",
# Specify the name of the remote worker pool all actions will execute on.
"Pool": "default",
},
)
platform(
name = "platform_with_network",
# By default we have network access disabled with the `:platform` target. This is an
# additional platform that extends from the default one but enables network access.
# Network is generally not recommended, but for some exceptions, like integration tests
# running a Yarn install, network access is reasonable. In such special cases, Bazel can
# be invoked to run with this platform. It is recommended that exec platforms with network
# access are used in combination with `--sandbox_default_allow_network=false` as this allows
# specific targets to be granted network access, while others will not have access.
exec_properties = ENABLE_NETWORK,
parents = [":platform"],
)