Skip to content

Pants Cloud Quickstart

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

  1. If you can’t find a pants.toml file, create one in the root directory of your Pantsbuild project:

    • Directoryproject/
      • get-pants.sh
      • BUILD
      • pants.toml
  2. Copy the following lines into your pants.toml:

    pants.toml
    [GLOBAL]
    remote_cache_read = true
    remote_cache_write = true
    remote_store_address = "[REMOTE_STORE_ADDRESS]"
    [GLOBAL.remote_store_headers]
    x-nativelink-api-key = "[API_KEY]"
  3. Run a pants build with the following flags:

    Terminal window
    pants --no-pantsd --no-local-cache test ::

    --no-pantsd and --no-local-cache aren’t how you’d normally want to run Pants. They’re just there to prevent the daemon and the local cache from preempting the remote cache, so you can see the latter in action.

  4. You’ll see remote cache use on the Dashboard page.