0

Remove gerrit-buildbucket-config command from MB.

The Gerrit plugin will now automatically populate the list of
tryservers from LUCI, meaning that we no longer need to manually
configure things and don't need to generate a config file from
the MB entries. Accordingly, this CL removes the
`gerrit-buildbucket-config` code from MB.

Bug: 813196
Change-Id: I1c4ba1099a11822c2c741eb21dc61e4f5a163369
Reviewed-on: https://chromium-review.googlesource.com/1053377
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
Reviewed-by: John Budorick <jbudorick@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#557416}
This commit is contained in:
Dirk Pranke
2018-05-10 01:47:45 +00:00
committed by Commit Bot
parent 91e95822f8
commit f8266167ee
4 changed files with 0 additions and 68 deletions

@ -186,21 +186,6 @@ Builds and isolates a given (ninja) target like the `isolate` command does,
and then takes all of the files in the isolate and writes them into a single
zip file that can then easily be redistributed.
### 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.
Note that after committing, `git cl upload` will not work. Instead, use `git
push origin HEAD:refs/for/refs/meta/config` to upload the CL for review.
## Isolates and Swarming
`mb gen` is also responsible for generating the `.isolate` and

@ -54,7 +54,6 @@ class MetaBuildWrapper(object):
self.sep = os.sep
self.args = argparse.Namespace()
self.configs = {}
self.luci_tryservers = {}
self.masters = {}
self.mixins = {}
@ -222,14 +221,6 @@ class MetaBuildWrapper(object):
help='path to config file (default is %(default)s)')
subp.set_defaults(func=self.CmdValidate)
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('zip',
help='generate a .zip containing the files needed '
'for a given binary')
@ -483,25 +474,6 @@ class MetaBuildWrapper(object):
('cpu', 'x86-64'),
os_dim]
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 = []
@ -665,7 +637,6 @@ class MetaBuildWrapper(object):
(self.args.config_file, e))
self.configs = contents['configs']
self.luci_tryservers = contents.get('luci_tryservers', {})
self.masters = contents['masters']
self.mixins = contents['mixins']

@ -2122,8 +2122,4 @@
'gn_args': 'target_cpu="x86"',
},
},
'luci_tryservers': {
'chromium.try': [ 'linux_chromium_rel_ng' ],
},
}

@ -190,10 +190,6 @@ TRYSERVER_CONFIG = """\
'try_builder2': 'fake_config',
},
},
'luci_tryservers': {
'luci_tryserver1': ['luci_builder1'],
'luci_tryserver2': ['luci_builder2'],
},
'configs': {},
'mixins': {},
}
@ -631,22 +627,6 @@ class UnitTest(unittest.TestCase):
mbw.files[mbw.default_config] = TEST_BAD_CONFIG
self.check(['validate'], mbw=mbw, ret=1)
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'))
def test_build_command_unix(self):
files = {
'/fake_src/out/Default/toolchain.ninja': '',