diff --git a/bin/cbuildbot.py b/bin/cbuildbot.py index 6708c045b4..4e6f55243b 100755 --- a/bin/cbuildbot.py +++ b/bin/cbuildbot.py @@ -378,11 +378,20 @@ def _UprevPackages(buildroot, tracking_branch, revisionfile, board): _UprevAllPackages(buildroot, tracking_branch, board) -def _UprevPush(buildroot, tracking_branch, board): +def _UprevPush(buildroot, tracking_branch, board, overlays): """Pushes uprev changes to the main line.""" cwd = os.path.join(buildroot, 'src', 'scripts') + public_overlay = '%s/src/third_party/chromiumos-overlay' % buildroot + private_overlay = '%s/src/private-overlays/chromeos-overlay' % buildroot + if overlays == 'private': + overlays = [private_overlay] + elif overlays == 'public': + overlays = [public_overlay] + else: + overlays = [public_overlay, private_overlay] RunCommand(['./cros_mark_as_stable', '--srcroot=..', '--board=%s' % board, + '--overlays="%s"' % " ".join(overlays), '--tracking_branch="%s"' % tracking_branch, '--push_options="--bypass-hooks -f"', 'push'], cwd=cwd) @@ -531,7 +540,8 @@ def main(): if buildconfig['master']: # Master bot needs to check if the other slaves completed. if cbuildbot_comm.HaveSlavesCompleted(config): - _UprevPush(buildroot, tracking_branch, buildconfig['board']) + _UprevPush(buildroot, tracking_branch, buildconfig['board'], + buildconfig['overlays']) else: Die('CBUILDBOT - One of the slaves has failed!!!') diff --git a/bin/cbuildbot_config.py b/bin/cbuildbot_config.py index 2e68b0e43f..e0b0bfad0a 100644 --- a/bin/cbuildbot_config.py +++ b/bin/cbuildbot_config.py @@ -10,7 +10,7 @@ config_param's: board -- The board of the image to build. uprev -- Uprevs the local ebuilds to build new changes since last stable. build. If master then also pushes these changes on success. -master -- Only one allowed to be True. This bot controls the uprev process. +master -- This bot pushes changes to the overlays. important -- Master bot uses important bots to determine overall status. i.e. if master bot succeeds and other important slaves succeed then the master will uprev packages. This should align @@ -19,7 +19,9 @@ hostname -- Needed for 'important' slaves. The hostname of the bot. Should match hostname in slaves.cfg in buildbot checkout. unittests -- Runs unittests for packages. smoke_bvt -- Runs the test smoke suite in a qemu-based VM using KVM. - +overlays -- If this bot is a master bot, select what overlays to push changes + to. This can be 'public', 'private', or 'both'. There should only + be one bot pushing changes to each overlay. """ @@ -40,6 +42,32 @@ config['x86-generic-pre-flight-queue'] = { 'hostname' : 'chromeosbuild2', 'unittests' : True, 'smoke_bvt' : True, + 'overlays': 'public', +} +config['x86-mario-pre-flight-queue'] = { + 'board' : 'x86-mario', + 'uprev' : True, + 'master' : True, + 'important' : False, + 'unittests' : True, + 'smoke_bvt' : True, + 'overlays': 'private', +} +config['x86_agz_bin'] = { + 'board' : 'x86-agz', + 'uprev' : True, + 'master' : False, + 'important' : False, + 'unittests' : True, + 'smoke_bvt' : True, +} +config['x86_dogfood_bin'] = { + 'board' : 'x86-dogfood', + 'uprev' : True, + 'master' : False, + 'important' : False, + 'unittests' : True, + 'smoke_bvt' : True, } config['x86_pineview_bin'] = { 'board' : 'x86-pineview', diff --git a/cros_mark_as_stable.py b/cros_mark_as_stable.py index da017ad7af..fe8706c2b1 100755 --- a/cros_mark_as_stable.py +++ b/cros_mark_as_stable.py @@ -21,6 +21,9 @@ from cros_build_lib import Info, RunCommand, Warning, Die gflags.DEFINE_string('board', '', 'Board for which the package belongs.', short_name='b') +gflags.DEFINE_string('overlays', '', + 'Space separated list of overlays to modify.', + short_name='o') gflags.DEFINE_string('packages', '', 'Space separated list of packages to mark as stable.', short_name='p') @@ -479,11 +482,13 @@ def main(argv): package_list = gflags.FLAGS.packages.split() _CheckSaneArguments(package_list, command) - - overlays = { - '%s/private-overlays/chromeos-overlay' % gflags.FLAGS.srcroot: [], - '%s/third_party/chromiumos-overlay' % gflags.FLAGS.srcroot: [] - } + if gflags.FLAGS.overlays: + overlays = dict((path, []) for path in gflags.FLAGS.overlays.split()) + else: + overlays = { + '%s/private-overlays/chromeos-overlay' % gflags.FLAGS.srcroot: [], + '%s/third_party/chromiumos-overlay' % gflags.FLAGS.srcroot: [] + } if command == 'commit': _BuildEBuildDictionary(overlays, gflags.FLAGS.all, package_list)