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

Unified Diff: scripts/master/buildbucket/client.py

Issue 968053003: BuildBucket-based build triggering (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: added build_url Created 5 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
Index: scripts/master/buildbucket/client.py
diff --git a/scripts/master/buildbucket/client.py b/scripts/master/buildbucket/client.py
index 7db82ce711c4128c27548af781272cae71c033d5..2c882ac014d48a5c12b0993f02fd3cc2bcf200e0 100644
--- a/scripts/master/buildbucket/client.py
+++ b/scripts/master/buildbucket/client.py
@@ -25,6 +25,13 @@ def buildbucket_api_discovery_url(hostname=None):
return (
'https://%s/_ah/api/discovery/v1/apis/{api}/{apiVersion}/rest' % hostname)
+
+def get_default_buildbucktet_hostname(master):
ghost stip (do not use) 2015/03/04 23:07:30 get_default_buildbucket_hostname
nodir 2015/03/04 23:52:09 Done
+ return (
+ BUILDBUCKET_HOSTNAME_PRODUCTION if master.is_production_host
+ else BUILDBUCKET_HOSTNAME_TESTING)
ghost stip (do not use) 2015/03/04 23:07:30 what happens when a master is started as part of m
nodir 2015/03/04 23:52:10 Tests don't fail: before it reaches this point, it
+
+
def create_buildbucket_service(
master, hostname=None, verbose=None):
"""Asynchronously creates buildbucket API resource.
@@ -32,9 +39,7 @@ def create_buildbucket_service(
Returns:
A DeferredResource as Deferred.
"""
- hostname = hostname or (
- BUILDBUCKET_HOSTNAME_PRODUCTION if master.is_production_host
- else BUILDBUCKET_HOSTNAME_TESTING)
+ hostname = hostname or get_default_buildbucktet_hostname(master)
ghost stip (do not use) 2015/03/04 23:07:30 same here
nodir 2015/03/04 23:52:10 Thanks
return DeferredResource.build(
'buildbucket',
'v1',

Powered by Google App Engine
This is Rietveld 408576698