mirror of https://github.com/mongodb/mongo
SERVER-115593 use RAAPI for eslint (#45332)
GitOrigin-RevId: a024c00299d5a2e0edb994653d5abbda62b92f2c
This commit is contained in:
parent
d315d18ea3
commit
cdc15ad29b
|
|
@ -103,15 +103,34 @@ def main():
|
||||||
|
|
||||||
# Use the nodejs binary from the bazel's npm repository
|
# Use the nodejs binary from the bazel's npm repository
|
||||||
# had to add '--build_runfile_links', '--legacy_external_runfiles' due to hard coded path below
|
# had to add '--build_runfile_links', '--legacy_external_runfiles' due to hard coded path below
|
||||||
subprocess.run(
|
bazel_base_cmd = [
|
||||||
[
|
|
||||||
"bazel",
|
"bazel",
|
||||||
"build",
|
"build",
|
||||||
"//:eslint",
|
"//:eslint",
|
||||||
"--config=local",
|
"--config=local",
|
||||||
"--build_runfile_links",
|
"--build_runfile_links",
|
||||||
"--legacy_external_runfiles",
|
"--legacy_external_runfiles",
|
||||||
],
|
]
|
||||||
|
bazel_remote_cache_opts = [
|
||||||
|
"--experimental_remote_downloader=grpcs://sodalite.cluster.engflow.com",
|
||||||
|
"--remote_cache=grpcs://sodalite.cluster.engflow.com",
|
||||||
|
]
|
||||||
|
|
||||||
|
try:
|
||||||
|
subprocess.run(
|
||||||
|
bazel_base_cmd + bazel_remote_cache_opts,
|
||||||
|
env=os.environ,
|
||||||
|
check=True,
|
||||||
|
cwd=REPO_ROOT,
|
||||||
|
)
|
||||||
|
except subprocess.CalledProcessError:
|
||||||
|
# Retry without the remote cache/downloader endpoints if the first attempt fails.
|
||||||
|
print(
|
||||||
|
"Bazel build with remote cache failed, retrying without remote cache/downloader.",
|
||||||
|
file=sys.stderr,
|
||||||
|
)
|
||||||
|
subprocess.run(
|
||||||
|
bazel_base_cmd,
|
||||||
env=os.environ,
|
env=os.environ,
|
||||||
check=True,
|
check=True,
|
||||||
cwd=REPO_ROOT,
|
cwd=REPO_ROOT,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue