Skip to content

Commit 07d38b9

Browse files
authored
provide a default read-only key for remote cache (#61)
Update the `.bazelrc` with a read-only key for the remote cache. Users may enable use of this key by passing `--config=remote` on the command line or setting it in `user.bazelrc`. Change-Id: Ia3c29ce665d4132c94d4d8a1104cfe499790c358
1 parent 10506d1 commit 07d38b9

File tree

3 files changed

+15
-14
lines changed

3 files changed

+15
-14
lines changed

.bazelrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ common --enable_platform_specific_config
1616
common:remote-cache --bes_results_url=https://oliverlee.buildbuddy.io/invocation/
1717
common:remote-cache --bes_backend=grpcs://oliverlee.buildbuddy.io
1818
common:remote-cache --remote_cache=grpcs://oliverlee.buildbuddy.io
19+
common:remote-cache --remote_instance_name=cortex_m-instance-0
20+
common:remote-cache --remote_header=x-buildbuddy-api-key=khiIK9lMQtIp1BztvPQE
1921
common:remote-cache --remote_timeout=10m
2022
common:remote-cache --remote_build_event_upload=minimal
2123
common:remote-cache --remote_download_outputs=minimal

.github/actions/ci-env-setup/action.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ runs:
3030
shell: bash
3131
run: |
3232
cp .github/workflows/ci.bazelrc ~/.bazelrc
33-
echo 'build:remote-cache --remote_header=x-buildbuddy-api-key=${{ inputs.buildbuddy-api-key }}' >> ~/.bazelrc
33+
rw_api_key="${{ inputs.buildbuddy-api-key }}"
34+
if [[ -n "$rw_api_key" ]]; then
35+
echo "build:remote-cache --remote_header=x-buildbuddy-api-key=$rw_api_key" >> ~/.bazelrc
36+
fi
3437
3538
- name: setup bazel vendored external deps
3639
shell: bash

.github/workflows/ci.bazelrc

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
common --build_metadata=ROLE=CI
1+
common --show_timestamps
2+
common --announce_rc
3+
common --color=yes
4+
common --curses=no
5+
common --terminal_columns=120
6+
common --verbose_failures
27

3-
build --show_timestamps
4-
build --announce_rc
5-
build --color=yes
6-
build --curses=no
7-
build --terminal_columns=120
8-
build --verbose_failures
9-
10-
build:remote-cache --remote_upload_local_results=true
11-
build:remote-cache --remote_instance_name=ci-runner-bazel-stm32-instance-0
12-
build --config=remote-cache
13-
14-
test --test_output=errors
8+
common:remote-cache --build_metadata=ROLE=CI
9+
common:remote-cache --remote_upload_local_results=true
10+
common --config=remote-cache

0 commit comments

Comments
 (0)