Commit 15234430 authored by Michael Moss's avatar Michael Moss Committed by Commit Bot

Revert "Add a "buildbucket" subcommand to mb."

This reverts commit b567cf95.

Reason for revert: breaking official.continuous builders
BUG=751954

Original change's description:
> Add a "buildbucket" subcommand to mb.
> 
> This subcommand prints the trybot configuration in the
> buildbucket.config format expected by gerrit. This should hopefully
> make it a little easier to maintain the buildbucket.config file.
> 
> Bug: 
> Change-Id: I7d956efb6c08128ae0ceaa6b68bcc9001296549c
> Reviewed-on: https://chromium-review.googlesource.com/568666
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Commit-Queue: Peter Collingbourne <pcc@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#491647}

TBR=agable@chromium.org,dpranke@chromium.org,pcc@chromium.org

Change-Id: I2cc5f086b9787723337795c3c2323c3bafdc89f3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/599393Reviewed-by: default avatarMichael Moss <mmoss@chromium.org>
Commit-Queue: Michael Moss <mmoss@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491656}
parent 284086f9
......@@ -167,18 +167,6 @@ The `-f/--config-file` and `-q/--quiet` flags work as documented for
This is mostly useful as a presubmit check and for verifying changes to
the config file.
### `mb gerrit-buildbucket-config`
Generates a gerrit buildbucket configuration file and prints it to
stdout. This file contains the list of trybots shown in gerrit's UI.
The master copy of the buildbucket.config file lives
in a separate branch of the chromium repository. Run `mb
gerrit-buildbucket-config > buildbucket.config.new && git fetch origin
refs/meta/config:refs/remotes/origin/meta/config && git checkout
-t -b meta_config origin/meta/config && mv buildbucket.config.new
buildbucket.config` to update the file.
## Isolates and Swarming
`mb gen` is also responsible for generating the `.isolate` and
......
......@@ -56,7 +56,6 @@ class MetaBuildWrapper(object):
self.sep = os.sep
self.args = argparse.Namespace()
self.configs = {}
self.luci_tryservers = {}
self.masters = {}
self.mixins = {}
......@@ -236,14 +235,6 @@ class MetaBuildWrapper(object):
' do compiles')
subp.set_defaults(func=self.CmdAudit)
subp = subps.add_parser('gerrit-buildbucket-config',
help='Print buildbucket.config for gerrit '
'(see MB user guide)')
subp.add_argument('-f', '--config-file', metavar='PATH',
default=self.default_config,
help='path to config file (default is %(default)s)')
subp.set_defaults(func=self.CmdBuildbucket)
subp = subps.add_parser('help',
help='Get help on a subcommand.')
subp.add_argument(nargs='?', action='store', dest='subcommand',
......@@ -377,25 +368,6 @@ class MetaBuildWrapper(object):
return ret
def CmdBuildbucket(self):
self.ReadConfigFile()
self.Print('# This file was generated using '
'"tools/mb/mb.py gerrit-buildbucket-config".')
for luci_tryserver in sorted(self.luci_tryservers):
self.Print('[bucket "luci.%s"]' % luci_tryserver)
for bot in sorted(self.luci_tryservers[luci_tryserver]):
self.Print('\tbuilder = %s' % bot)
for master in sorted(self.masters):
if master.startswith('tryserver.'):
self.Print('[bucket "master.%s"]' % master)
for bot in sorted(self.masters[master]):
self.Print('\tbuilder = %s' % bot)
return 0
def CmdValidate(self, print_ok=True):
errs = []
......@@ -702,7 +674,6 @@ class MetaBuildWrapper(object):
(self.args.config_file, e))
self.configs = contents['configs']
self.luci_tryservers = contents['luci_tryservers']
self.masters = contents['masters']
self.mixins = contents['mixins']
......
......@@ -520,7 +520,6 @@
'cast_shell_audio_linux': 'cast_audio_release_trybot',
'chromeos_amd64-generic_chromium_compile_only_ng': 'cros_chrome_sdk',
'chromeos_daisy_chromium_compile_only_ng': 'cros_chrome_sdk',
'chromium_presubmit': 'presubmit',
'closure_compilation': 'closure_compilation',
'fuchsia': 'release_trybot_fuchsia',
'fuchsia_compile': 'release_trybot_fuchsia',
......@@ -1410,11 +1409,6 @@
'ozone_linux', 'release_trybot',
],
'presubmit': [
# The chromium_presubmit bot does not use mb.
'error',
],
'release_afl_asan': [
'release', 'afl', 'asan', 'chromeos_codecs', 'pdf_xfa', 'disable_nacl',
],
......@@ -1987,8 +1981,4 @@
'gn_args': 'target_cpu="x86"',
},
},
'luci_tryservers': {
'chromium.try': [ 'LUCI linux_chromium_rel_ng' ],
},
}
......@@ -122,7 +122,6 @@ TEST_CONFIG = """\
'fake_args_file_twice': 'args_file_twice',
},
},
'luci_tryservers': {},
'configs': {
'args_file_goma': ['args_file', 'goma'],
'args_file_twice': ['args_file', 'args_file'],
......@@ -182,7 +181,6 @@ TEST_BAD_CONFIG = """\
'b': 'gn_rel_bot_2',
},
},
'luci_tryservers': {},
'mixins': {
'gn': {'type': 'gn'},
'chrome_with_codecs': {
......@@ -207,7 +205,6 @@ GYP_HACKS_CONFIG = """\
'fake_builder': 'fake_config',
},
},
'luci_tryservers': {},
'configs': {
'fake_config': ['fake_mixin'],
},
......@@ -223,28 +220,6 @@ GYP_HACKS_CONFIG = """\
}
"""
TRYSERVER_CONFIG = """\
{
'masters': {
'not_a_tryserver': {
'fake_builder': 'fake_config',
},
'tryserver.chromium.linux': {
'try_builder': 'fake_config',
},
'tryserver.chromium.mac': {
'try_builder2': 'fake_config',
},
},
'luci_tryservers': {
'luci_tryserver1': ['luci_builder1'],
'luci_tryserver2': ['luci_builder2'],
},
'configs': {},
'mixins': {},
}
"""
class UnitTest(unittest.TestCase):
def fake_mbw(self, files=None, win32=False):
......@@ -580,22 +555,6 @@ class UnitTest(unittest.TestCase):
"LLVM_FORCE_HEAD_REVISION=1\n"
"python build/gyp_chromium -G output_dir=_path_\n"))
def test_buildbucket(self):
mbw = self.fake_mbw()
mbw.files[mbw.default_config] = TRYSERVER_CONFIG
self.check(['gerrit-buildbucket-config'], mbw=mbw,
ret=0,
out=('# This file was generated using '
'"tools/mb/mb.py gerrit-buildbucket-config".\n'
'[bucket "luci.luci_tryserver1"]\n'
'\tbuilder = luci_builder1\n'
'[bucket "luci.luci_tryserver2"]\n'
'\tbuilder = luci_builder2\n'
'[bucket "master.tryserver.chromium.linux"]\n'
'\tbuilder = try_builder\n'
'[bucket "master.tryserver.chromium.mac"]\n'
'\tbuilder = try_builder2\n'))
if __name__ == '__main__':
unittest.main()
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