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

Check for more preconditions before deploying #4606

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
12 changes: 12 additions & 0 deletions src/local/butler/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,9 @@ def execute(args):
_enforce_tests_pass()
_enforce_safe_day_to_deploy()

# Needed for some subsequent steps.
common.execute('gcloud auth application-default login')
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hmmm...We don't use the gcb deploy so much but I'm not sure this works there. Also does it force me to login each deploy?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think it would force you to log in on each deploy, yes. That was required to deploy to appengine when I tried - the culprit was python butler.py run setup on line 438.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's leave this out please. It might save you some time but it will break out GCB deploy and make things more annoying for me to deploy (particularly because I SSH into the machine I deploy from).


# Build templates before deployment.
appengine.build_templates()

Expand Down Expand Up @@ -570,6 +573,15 @@ def execute(args):
deploy_k8s = False
deploy_zips = True

if deploy_k8s:
if not common.has_file_in_path('terraform'):
print('terraform not found in PATH.')
sys.exit(1)

if not common.has_file_in_path('kubectl'):
print('kubectl not found in PATH.')
sys.exit(1)

package_zip_paths = []
if deploy_zips:
for platform_name in platforms:
Expand Down
Loading