Skip to content

Commit 6046e86

Browse files
josephperrottalxhub
authored andcommitted
build: update setup-rbe.sh script to accept non google.com/angular.io (angular#36846)
Previously the setup-rbe.sh script did not allow accounts that did have domains of angular.io or google.com. Since we add emails from other domains into [email protected], we are unable to be certain in the script that the account is not actually a member of the required group. This change adds the option to choose to continue with an email account logged in which we cannot verify by domain. PR Close angular#36846
1 parent 297dab8 commit 6046e86

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

scripts/local-dev/setup-rbe.sh

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,22 @@ function confirm_gcloud_login() {
5252
access_token=$(gcloud auth application-default print-access-token)
5353
current_account=$(curl -s https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=$access_token | node $full_script_path/get-email)
5454
if [[ ! $current_account =~ (angular\.io$)|(google\.com$) ]]; then
55+
echo
5556
echo "Logged in as $current_account";
56-
echo "An angular.io or google.com account must be used for remote Bazel usage."
57-
echo "Please login instead using an account from one of these domains."
58-
read -p "Rerun login command now? [Y/y]"
57+
echo "The account used for remote build execution must be a member of [email protected]"
58+
echo "or [email protected]."
59+
echo
60+
echo "As $current_account is not from either domain, membership cannot be automatically"
61+
echo "determined. If you know $current_account to be a member of one of the required groups"
62+
echo "you can proceed, using it for authentication."
63+
echo
64+
read -p "Continue RBE setup using $current_account? [Y/y]"
65+
if [[ $REPLY =~ ^[Yy]$ ]]; then
66+
return
67+
fi
68+
echo
69+
echo "Please login instead using an account that is a member of the one of the above groups."
70+
read -p "Rerun login now? [Y/y]"
5971
if [[ $REPLY =~ ^[Yy]$ ]]; then
6072
gcloud_login
6173
confirm_gcloud_login

0 commit comments

Comments
 (0)