Skip to content

Commit 5e07cc7

Browse files
authored
Merge pull request #7753 from Pinata-Consulting/bazel-user-bazelrc-cache-config
bazel: document alternative way to configure caching
2 parents 2d97822 + 921976a commit 5e07cc7

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

docs/user/Bazel-caching.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,28 @@ bazel build --config=openroad-dev //...
5151

5252
This configuration is **read-only** to prevent local, unverified builds from populating the shared cache.
5353

54+
### Using a `user.bazelrc` file instead of `--config=openroad-dev`
55+
56+
You may prefer `user.bazelrc` file instead of using the `--config=openroad-dev` option.
57+
58+
# user: username@openroad.tools
59+
build --remote_cache=https://storage.googleapis.com/openroad-bazel-cache
60+
build --credential_helper=*.googleapis.com=%workspace%/etc/cred_helper.py
61+
build --remote_cache_compression=true
62+
build --remote_upload_local_results=false
63+
64+
To test the setup:
65+
66+
$ etc/cred_helper.py test
67+
Running: gcloud auth print-access-token username@openroad.tools
68+
{
69+
"kind": "storage#testIamPermissionsResponse",
70+
"permissions": [
71+
"storage.buckets.get",
72+
"storage.objects.create"
73+
]
74+
}
75+
5476
---
5577

5678
### 3. CI Access (Jenkins Pipeline)

0 commit comments

Comments
 (0)