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

Side by Side Diff: dashboard/bin/deploy

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 unified diff | Download patch
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright 2015 The Chromium Authors. All rights reserved. 2 # Copyright 2015 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import argparse
7 import os 6 import os
8 import sys 7 import sys
9 8
10 9
11 def _AddToPathIfNeeded(path): 10 def _AddToPathIfNeeded(path):
12 if path not in sys.path: 11 if path not in sys.path:
13 sys.path.insert(0, path) 12 sys.path.insert(0, path)
14 13
15 14
16 def Main(): 15 def Main():
17 catapult_path = os.path.abspath(os.path.join( 16 dashboard_path = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
18 os.path.dirname(__file__), '..', '..')) 17 _AddToPathIfNeeded(dashboard_path)
19 parser = argparse.ArgumentParser() 18 import dashboard
20 parser.add_argument('--appid', default='chromeperf')
21 parser.add_argument('--service', default=None)
22 args = parser.parse_args()
23 19
24 _AddToPathIfNeeded(os.path.join(catapult_path, 'dashboard')) 20 catapult_path = os.path.dirname(dashboard_path)
25 import dashboard
26 paths = dashboard.PathsForDeployment()
27
28 _AddToPathIfNeeded(catapult_path) 21 _AddToPathIfNeeded(catapult_path)
29 from catapult_build import appengine_deploy 22 from catapult_build import appengine_deploy
30 appengine_deploy.AppcfgUpdate(paths, app_id=args.appid, 23
31 service_name=args.service) 24 appengine_deploy.Deploy(dashboard.PathsForDeployment(), sys.argv[1:])
32 25
33 26
34 if __name__ == '__main__': 27 if __name__ == '__main__':
35 Main() 28 Main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698