Commit 1786b11d authored by Robert Ma's avatar Robert Ma Committed by Commit Bot

[blinkpy] Provide a default bucket to git cl try

Since https://crrev.com/c/1779543 , `git cl try` now requires the bucket
name to always be specified. This change sets "luci.chromium.try" as the
default bucket when no bucket is configured in builders.json or passed
to `trigger_try_jobs`.

Change-Id: I5d12625f49f3a57c852abdcbefe641b1eb17d7a6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1783640
Auto-Submit: Robert Ma <robertma@chromium.org>
Reviewed-by: default avatarLuke Z <lpz@chromium.org>
Commit-Queue: Robert Ma <robertma@chromium.org>
Cr-Commit-Position: refs/heads/master@{#693195}
parent 03dd0691
......@@ -72,7 +72,6 @@
"linux-blink-rel": {
"port_name": "linux-trusty",
"specifiers": ["Trusty", "Release"],
"master": "tryserver.blink",
"has_webdriver_tests": true,
"is_try_builder": true
},
......
......@@ -94,7 +94,7 @@ class MockHost(MockSystemHost):
'is_try_builder': True,
},
'android_blink_rel': {
'bucket': 'luci.chromium.try',
'bucket': 'luci.chromium.android',
'port_name': 'android-kitkat',
'specifiers': ['KitKat', 'Release'],
'is_try_builder': True,
......
......@@ -84,10 +84,9 @@ class GitCL(object):
# Sort both buckets and builders to ensure stable unit tests.
for bucket in sorted(builders_by_bucket):
command = ['try']
# Only specify bucket if it's explicitly given to us. Otherwise,
# `git cl` will figure out the appropriate bucket.
if bucket:
command.extend(['-B', bucket])
# Buckets are required by `git cl try`. When no bucket is specified,
# use the default bucket.
command.extend(['-B', bucket or 'luci.chromium.try'])
for builder in sorted(builders_by_bucket[bucket]):
command.extend(['-b', builder])
self.run(command)
......
......@@ -47,12 +47,13 @@ class GitCLTest(unittest.TestCase):
self.assertEqual(host.executive.calls, [
[
'git', 'cl', 'try',
'-B', 'luci.chromium.try',
'-b', 'fake_blink_try_linux', '-b', 'fake_blink_try_win',
'--auth-refresh-token-json', 'token.json'
],
[
'git', 'cl', 'try',
'-B', 'luci.chromium.try',
'-B', 'luci.chromium.android',
'-b', 'android_blink_rel',
'--auth-refresh-token-json', 'token.json'
],
......@@ -66,6 +67,7 @@ class GitCLTest(unittest.TestCase):
self.assertEqual(host.executive.calls, [
[
'git', 'cl', 'try',
'-B', 'luci.chromium.try',
'-b', 'fake_blink_try_linux', '-b', 'fake_blink_try_win',
'--auth-refresh-token-json', 'token.json'
],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment