Skip to content

Commit

Permalink
chore(NA): remove write permissions on Bazel remote cache for PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
mistic committed Feb 8, 2021
1 parent dccea86 commit 846108c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/dev/ci_setup/setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,15 @@ fi
###
cp -f "$KIBANA_DIR/src/dev/ci_setup/.bazelrc-ci" "$HOME/.bazelrc";

###
### remove write permissions on buildbuddy remote cache for prs
###
if [[ "$ghprbPullId" ]] ; then
echo "# Appended by $KIBANA_DIR/src/dev/ci_setup/setup.sh" >> "$HOME/.bazelrc"
echo "# Uploads logs & artifacts without writing to cache" >> "$HOME/.bazelrc"
echo "build --noremote_upload_local_results" >> "$HOME/.bazelrc"
fi

###
### append auth token to buildbuddy into "$HOME/.bazelrc";
###
Expand Down

0 comments on commit 846108c

Please sign in to comment.