Bazel Cloud Quickstart
To connect NativeLink to your Bazel project, just add the code below to your .bazelrc file. If you can’t find a .bazelrc file - create one in the same directory as your Bazel WORKSPACE or MODULE.bazel file.
-
Configure your
.bazelrc- Copy the following lines into your
.bazelrc:build --remote_cache=[CLAIM_CAS_URL]build --remote_header=x-nativelink-api-key=[API_KEY]build --remote_timeout=600build --bes_backend=[CLAIM_BES_URL]build --bes_header=x-nativelink-api-key=[API_KEY]build --remote_timeout=600
- Copy the following lines into your
-
Validate Connection
- Once you’ve added those lines to your
.bazelrc, run a Bazel build. - You will see remote cache utilization on the Dashboard page if your
.bazelrcis configured correctly.
- Once you’ve added those lines to your