Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(NA): remove write permissions on Bazel remote cache for PRs #90652

Merged
merged 2 commits into from
Feb 8, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this doesn't actually modify or remove the permissions, right?

Suggested change
### remove write permissions on buildbuddy remote cache for prs
### prs don't have write permissions on buildbuddy remote cache

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is actually adding a flag into the bazelrc file for ci in order to not allow to upload results to the remote cache on those 😄

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm, is that something we can enforce with different tokens for PR jobs or something?

###
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