Skip to content

Bazel Cloud Quickstart

This guide shows how to connect your Bazel project to NativeLink Cloud.

  1. If you can’t find a .bazelrc file create one in your project root:

    • Directoryproject/
      • WORKSPACE.bazel
      • MODULE.bazel
      • BUILD.bazel
      • .bazelrc
  2. Copy the following lines into your .bazelrc:

    .bazelrc
    build --remote_cache=[CLAIM_CAS_URL]
    build --remote_header=x-nativelink-api-key=[API_KEY]
    build --remote_timeout=600
    build --bes_backend=[CLAIM_BES_URL]
    build --bes_header=x-nativelink-api-key=[API_KEY]
    build --remote_timeout=600
  3. Run a Bazel build and you’ll see remote cache use on the Dashboard page.