Skip to content

build: create script for setting up RBE in local dev environment #16375

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

Merged
merged 1 commit into from
Jun 26, 2019

Conversation

josephperrott
Copy link
Member

No description provided.

@josephperrott josephperrott added pr: merge safe target: patch This PR is targeted for the next patch release labels Jun 24, 2019
@josephperrott josephperrott requested a review from devversion June 24, 2019 21:45
@josephperrott josephperrott requested a review from jelbourn as a code owner June 24, 2019 21:45
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jun 24, 2019
# Determine the root directory of the Angular github repo.
GITHUB_DIRECTORY_ROOT=$(git rev-parse --show-toplevel 2> /dev/null);
if [[ $? -ne 0 ]]; then
echo "This command must be run from within the angular repository."
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
echo "This command must be run from within the angular repository."
echo "This command must be run from within the cloned \"angular/components\" repository."


# Confirm the parameter provided to the script is a directory
if [[ ! -d $1 ]]; then
echo "The paramter provided is not a directory";
Copy link
Member

Choose a reason for hiding this comment

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

There is a typo for parameter here. How about showing the usage instead? Maybe also expand on why we need to even specify a directory.

Suggested change
echo "The paramter provided is not a directory";
echo "Invalid command syntax. Usage: ./script.sh <ServiceAccountKeyLocation>";

echo "The paramter provided is not a directory";
exit 1;
fi
ABSOLUTE_DIRECTORY_PATH=$(readlink -f $1)
Copy link
Member

Choose a reason for hiding this comment

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

Nit: For clarity I think the variable name should be named differently. Absolute directory path only describes the type but not what the variable contains.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I can see that, I tried something else. I can't come up with a good name so if you have any ideas let me know.

Copy link
Member

Choose a reason for hiding this comment

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

credentialsDirectory?

@josephperrott josephperrott force-pushed the setup-local-rbe branch 2 times, most recently from ef69bce to def60fb Compare June 25, 2019 17:00
# environment to use Remote Build Execution.

# Determine the root directory of the Angular github repo.
GITHUB_DIRECTORY_ROOT=$(git rev-parse --show-toplevel 2> /dev/null);
Copy link
Member

Choose a reason for hiding this comment

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

Prefer lower_case_snake_case for bash variables


# Confirm gcloud installed and available as a command.
if [ ! -x "$(command -v gcloud)" ]; then
echo "gcloud command is not available. Please install gcloud before continuing."
Copy link
Member

Choose a reason for hiding this comment

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

Could this script install gcloud?

Copy link
Member Author

Choose a reason for hiding this comment

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

We can't install gcloud because dependent on your platform we have to install it differently.

@josephperrott josephperrott force-pushed the setup-local-rbe branch 2 times, most recently from 9e54d69 to 21c4a9c Compare June 25, 2019 17:34
Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

LGTM

@jelbourn jelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker labels Jun 25, 2019
@andrewseguin andrewseguin merged commit 93f4b58 into angular:master Jun 26, 2019
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 11, 2019
@josephperrott josephperrott deleted the setup-local-rbe branch March 20, 2020 22:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants