mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-04 19:56:32 +02:00
Add ability to push to subset of overlays we rev.
We also fix some of the configs for existing configurations. Change-Id: I34baa9664ff9e91268c8bac976ab2ab0aee51bfb BUG=chromium-os:9714 TEST=Running now with cbuildbot x86-generic-pre-flight-queue. Review URL: http://codereview.chromium.org/5531002
This commit is contained in:
parent
59a6600edd
commit
55430beaef
@ -532,7 +532,8 @@ def _ResolveOverlays(buildroot, overlays):
|
||||
elif overlays == 'both':
|
||||
paths = [public_overlay, private_overlay]
|
||||
else:
|
||||
Die('Incorrect overlay configuration: %s' % overlays)
|
||||
Info('No overlays found.')
|
||||
paths = []
|
||||
return paths
|
||||
|
||||
|
||||
@ -623,11 +624,18 @@ def main():
|
||||
|
||||
try:
|
||||
# Calculate list of overlay directories.
|
||||
overlays = _ResolveOverlays(buildroot, buildconfig['overlays'])
|
||||
rev_overlays = _ResolveOverlays(buildroot, buildconfig['rev_overlays'])
|
||||
push_overlays = _ResolveOverlays(buildroot, buildconfig['push_overlays'])
|
||||
# We cannot push to overlays that we don't rev.
|
||||
assert set(push_overlays).issubset(set(rev_overlays))
|
||||
# Either has to be a master or not have any push overlays.
|
||||
assert buildconfig['master'] or not push_overlays
|
||||
|
||||
board = buildconfig['board']
|
||||
old_binhost = None
|
||||
|
||||
_PreFlightRinse(buildroot, buildconfig['board'], tracking_branch, overlays)
|
||||
_PreFlightRinse(buildroot, buildconfig['board'], tracking_branch,
|
||||
rev_overlays)
|
||||
chroot_path = os.path.join(buildroot, 'chroot')
|
||||
boardpath = os.path.join(chroot_path, 'build', board)
|
||||
if options.sync:
|
||||
@ -642,8 +650,7 @@ def main():
|
||||
RunCommand(['sudo', 'rm', '-rf', boardpath])
|
||||
|
||||
# Check that all overlays can be found.
|
||||
for path in overlays:
|
||||
assert ':' not in path, 'Overlay must not contain colons: %s' % path
|
||||
for path in rev_overlays:
|
||||
if not os.path.isdir(path):
|
||||
Die('Missing overlay: %s' % path)
|
||||
|
||||
@ -659,7 +666,7 @@ def main():
|
||||
options.chrome_rev)
|
||||
elif buildconfig['uprev']:
|
||||
_UprevPackages(buildroot, tracking_branch, revisionfile,
|
||||
buildconfig['board'], overlays)
|
||||
buildconfig['board'], rev_overlays)
|
||||
|
||||
_EnableLocalAccount(buildroot)
|
||||
# Doesn't rebuild without acquiring more source.
|
||||
@ -681,7 +688,7 @@ def main():
|
||||
_RunSmokeSuite(buildroot, test_results_dir)
|
||||
finally:
|
||||
if not options.debug:
|
||||
archive_full_path=os.path.join(options.gsutil_archive,
|
||||
archive_full_path = os.path.join(options.gsutil_archive,
|
||||
str(options.buildnumber))
|
||||
_ArchiveTestResults(buildroot, buildconfig['board'],
|
||||
test_results_dir=test_results_dir,
|
||||
@ -694,10 +701,10 @@ def main():
|
||||
if buildconfig['master']:
|
||||
# Master bot needs to check if the other slaves completed.
|
||||
if cbuildbot_comm.HaveSlavesCompleted(config):
|
||||
_UploadPrebuilts(buildroot, board, buildconfig['overlays'],
|
||||
_UploadPrebuilts(buildroot, board, buildconfig['rev_overlays'],
|
||||
[new_binhost])
|
||||
_UprevPush(buildroot, tracking_branch, buildconfig['board'],
|
||||
overlays, options.debug)
|
||||
push_overlays, options.debug)
|
||||
else:
|
||||
Die('CBUILDBOT - One of the slaves has failed!!!')
|
||||
|
||||
|
||||
@ -19,9 +19,12 @@ 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 -- Select what overlays to look at. This can be 'public', 'private'
|
||||
or 'both'. There should only be one master bot pushing changes to
|
||||
each overlay per branch.
|
||||
rev_overlays -- Select what overlays to look at for revving. This can be
|
||||
'public', 'private' or 'both'.
|
||||
push_overlays -- Select what overlays to push at. This should be a subset of
|
||||
rev_overlays for the particular builder. Must be None if
|
||||
not a master. There should only be one master bot pushing
|
||||
changes to each overlay per branch.
|
||||
"""
|
||||
|
||||
|
||||
@ -33,7 +36,8 @@ config['default'] = {
|
||||
'important' : False,
|
||||
'unittests' : False,
|
||||
'smoke_bvt' : False,
|
||||
'overlays': 'public',
|
||||
'rev_overlays': 'public',
|
||||
'push_overlays': None,
|
||||
}
|
||||
config['x86-generic-pre-flight-queue'] = {
|
||||
'board' : 'x86-generic',
|
||||
@ -43,7 +47,8 @@ config['x86-generic-pre-flight-queue'] = {
|
||||
'hostname' : 'chromeosbuild2',
|
||||
'unittests' : True,
|
||||
'smoke_bvt' : True,
|
||||
'overlays': 'public',
|
||||
'rev_overlays': 'public',
|
||||
'push_overlays': 'public',
|
||||
}
|
||||
config['x86-mario-pre-flight-queue'] = {
|
||||
'board' : 'x86-mario',
|
||||
@ -52,7 +57,8 @@ config['x86-mario-pre-flight-queue'] = {
|
||||
'important' : False,
|
||||
'unittests' : True,
|
||||
'smoke_bvt' : True,
|
||||
'overlays': 'private',
|
||||
'rev_overlays': 'both',
|
||||
'push_overlays': 'private',
|
||||
}
|
||||
config['x86-mario-pre-flight-branch'] = {
|
||||
'board' : 'x86-mario',
|
||||
@ -61,7 +67,8 @@ config['x86-mario-pre-flight-branch'] = {
|
||||
'important' : False,
|
||||
'unittests' : True,
|
||||
'smoke_bvt' : True,
|
||||
'overlays': 'both',
|
||||
'rev_overlays': 'both',
|
||||
'push_overlays': 'both',
|
||||
}
|
||||
config['x86_agz_bin'] = {
|
||||
'board' : 'x86-agz',
|
||||
@ -70,7 +77,8 @@ config['x86_agz_bin'] = {
|
||||
'important' : False,
|
||||
'unittests' : True,
|
||||
'smoke_bvt' : True,
|
||||
'overlays': 'private',
|
||||
'rev_overlays': 'both',
|
||||
'push_overlays': None,
|
||||
}
|
||||
config['x86_dogfood_bin'] = {
|
||||
'board' : 'x86-dogfood',
|
||||
@ -79,7 +87,8 @@ config['x86_dogfood_bin'] = {
|
||||
'important' : False,
|
||||
'unittests' : True,
|
||||
'smoke_bvt' : True,
|
||||
'overlays': 'private',
|
||||
'rev_overlays': 'both',
|
||||
'push_overlays': None,
|
||||
}
|
||||
config['x86_pineview_bin'] = {
|
||||
'board' : 'x86-pineview',
|
||||
@ -87,7 +96,8 @@ config['x86_pineview_bin'] = {
|
||||
'master' : False,
|
||||
'important' : False,
|
||||
'unittests': True,
|
||||
'overlays': 'public',
|
||||
'rev_overlays': 'public',
|
||||
'push_overlays': None,
|
||||
}
|
||||
config['arm_tegra2_bin'] = {
|
||||
'board' : 'tegra2',
|
||||
@ -95,7 +105,8 @@ config['arm_tegra2_bin'] = {
|
||||
'master' : False,
|
||||
'important' : False,
|
||||
'unittests' : False,
|
||||
'overlays': 'public',
|
||||
'rev_overlays': 'public',
|
||||
'push_overlays': None,
|
||||
}
|
||||
config['arm_generic_bin'] = {
|
||||
'board' : 'arm-generic',
|
||||
@ -103,5 +114,6 @@ config['arm_generic_bin'] = {
|
||||
'master' : False,
|
||||
'important' : False,
|
||||
'unittests' : False,
|
||||
'overlays': 'public',
|
||||
'rev_overlays': 'public',
|
||||
'push_overlays': None,
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user