git_cache: add OVERRIDE_BOOTSTRAP_BUCKET option.

Will use used by led-triggered tests of git_cache_updater builder.
Companion recipe CL: https://chromium-review.googlesource.com/c/infra/infra/+/1568156

R=hinoka

Change-Id: Ib25824d4d04cfb8aa0831fc5ae666a94808b289e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1567999
Reviewed-by: Ryan Tseng <hinoka@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
changes/99/1567999/2
Andrii Shyshkalov 6 years ago committed by Commit Bot
parent db58954c8c
commit 4b79c3870c

@ -245,9 +245,14 @@ class Mirror(object):
@property
def bootstrap_bucket(self):
b = os.getenv('OVERRIDE_BOOTSTRAP_BUCKET')
if b:
return b
u = urlparse.urlparse(self.url)
if u.netloc == 'chromium.googlesource.com':
return 'chromium-git-cache'
# TODO(tandrii): delete once LUCI migration is completed.
# Only public hosts will be supported going forward.
elif u.netloc == 'chrome-internal.googlesource.com':
return 'chrome-git-cache'
# Not recognized.

Loading…
Cancel
Save