-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Polish cloud docs for Bazel and Pants (#1152)
- Loading branch information
1 parent
d9922b3
commit c54fe00
Showing
5 changed files
with
98 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
title: "Bazel Cloud Quickstart" | ||
description: "Connect your Bazel project to NativeLink Cloud" | ||
pagefind: true | ||
--- | ||
|
||
This guide shows how to connect your [Bazel](https://bazel.build/) project to | ||
[NativeLink Cloud](https://app.nativelink.com). | ||
|
||
import { Steps } from "@astrojs/starlight/components"; | ||
import { FileTree } from "@astrojs/starlight/components"; | ||
|
||
<Steps> | ||
|
||
1. If you can't find a `.bazelrc` file create one in your project root: | ||
|
||
<FileTree> | ||
- project/ | ||
- WORKSPACE.bazel | ||
- MODULE.bazel | ||
- BUILD.bazel | ||
- **.bazelrc** | ||
</FileTree> | ||
|
||
2. Copy the following lines into your `.bazelrc`: | ||
|
||
```bash | ||
# .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 | ||
``` | ||
|
||
:::note | ||
Fill in the `CLAIM_CAS_URL`, `CLAIM_BES_URL` and `API_KEY` from [NativeLink Cloud](https://app.nativelink.com). | ||
::: | ||
|
||
3. Run a Bazel build and you'll see remote cache use on the | ||
[Dashboard](https://app.nativelink.com) page. | ||
|
||
</Steps> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- | ||
title: "Pants Cloud Quickstart" | ||
description: "Connect your Pants project to NativeLink Cloud" | ||
pagefind: true | ||
--- | ||
|
||
This guide shows how to connect your [Pantsbuild](https://www.pantsbuild.org/) | ||
project to [NativeLink Cloud](https://app.nativelink.com). | ||
|
||
import { Steps } from "@astrojs/starlight/components"; | ||
import { FileTree } from "@astrojs/starlight/components"; | ||
|
||
<Steps> | ||
|
||
1. If you can't find a `pants.toml` file, create one in the root directory of | ||
your Pantsbuild project: | ||
|
||
<FileTree> | ||
- project/ | ||
- get-pants.sh | ||
- BUILD | ||
- **pants.toml** | ||
</FileTree> | ||
|
||
2. Copy the following lines into your `pants.toml`: | ||
|
||
```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]" | ||
``` | ||
|
||
:::note | ||
Fill in the `REMOTE_STORE_ADDRESS` and `API_KEY` from the [NativeLink Cloud](https://app.nativelink.com). | ||
::: | ||
|
||
3. Run a pants build with the following flags: | ||
|
||
```bash | ||
pants --no-pantsd --level=trace --no-local-cache test :: | ||
``` | ||
|
||
4. You'll see remote cache use on the [Dashboard](https://app.nativelink.com) | ||
page. | ||
|
||
</Steps> |