Update Bazel cache in GCB
This change adds `BAZEL_GOOGLE_CREDENTIALS` environment variable in `cloudbuild` to update Bazel cache after merges.
Fixes
@@ -94,6 +94,10 @@ artifacts:
timeout: 2h
options:
+ env:
+ # This variable is only defined in the `merge` GCB trigger,
+ # and contains GCB credentials for updating the Bazel cache.
+ - 'BAZEL_GOOGLE_CREDENTIALS=$_BAZEL_GOOGLE_CREDENTIALS'
# See: https://cloud.google.com/cloud-build/docs/api/reference/rest/Shared.Types/MachineType
machineType: 'N1_HIGHCPU_32'
requestedVerifyOption: 'VERIFIED'
