Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2525)

Unified Diff: catapult_build/appengine_deploy.py

Issue 2701113002: Migrate to the Google Cloud SDK. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | dashboard/bin/deploy » ('j') | dashboard/docs/getting-set-up.md » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: catapult_build/appengine_deploy.py
diff --git a/catapult_build/appengine_deploy.py b/catapult_build/appengine_deploy.py
index a7316a18c70041cf94074e197971c1f839debe6c..eae52012cb9041e9f97c381be386a69993de89bf 100644
--- a/catapult_build/appengine_deploy.py
+++ b/catapult_build/appengine_deploy.py
@@ -13,31 +13,25 @@ import sys
from catapult_build import temp_deployment_dir
-def AppcfgUpdate(paths, app_id, service_name=None):
+def Deploy(paths, args):
"""Deploys a new version of an App Engine app from a temporary directory.
Args:
paths: List of paths to files and directories that should be linked
(or copied) in the deployment directory.
- app_id: The application ID to use.
+ args: Arguments passed to "gcloud app deploy".
"""
with temp_deployment_dir.TempDeploymentDir(
paths, use_symlinks=False) as temp_dir:
print 'Deploying from "%s".' % temp_dir
- script_path = _FindScriptInPath('appcfg.py')
+ script_path = _FindScriptInPath(os.path.join('..', 'lib', 'gcloud.py'))
perezju 2017/02/20 10:22:26 This seems odd. The error message bellow suggests
dtu 2017/02/22 01:09:40 Done. I've changed it to look for 'gcloud.cmd' on
if not script_path:
- print 'This script requires the App Engine SDK to be in PATH.'
+ print 'This script requires the Google Cloud SDK to be in PATH.'
sullivan 2017/02/20 14:58:36 Can this also link to instructions for installing
dtu 2017/02/22 01:09:40 Done.
sys.exit(1)
- subprocess.call([
- sys.executable,
- script_path,
- '--application=%s' % app_id,
- '--version=%s' % _VersionName(),
- 'update',
- os.path.join(temp_dir, service_name) if service_name else temp_dir,
- ])
+ subprocess.call([sys.executable, script_path, 'app', 'deploy',
shatch 2017/02/20 21:31:01 I forget if we discussed this in last week's sync,
dtu 2017/02/22 01:09:40 --quiet: No, deployment is fast enough that it sho
+ '--version', _VersionName()] + args)
shatch 2017/02/20 21:31:01 I seemed to need to add cwd=temp_dir otherwise my
dtu 2017/02/22 01:09:40 Done.
def _FindScriptInPath(script_name):
« no previous file with comments | « no previous file | dashboard/bin/deploy » ('j') | dashboard/docs/getting-set-up.md » ('J')

Powered by Google App Engine
This is Rietveld 408576698