import copy from buildbot.buildslave import BuildSlave from buildbot.scheduler import Nightly from buildbot.process import factory from buildbot.steps.shell import Compile, ShellCommand from buildbot.steps import source from buildbot.status import html # ------------------------------------------------------------------------------------------------------------------------------------------------ def bbot_build_oe_target(factory, target): factory.addStep(ShellCommand, description=["Building", defaultenv['MACHINE'], target], command=["/home/buildbot/scripts/full-oe-autobuild", target], env=copy.copy(defaultenv), timeout=10000) def bbot_initialize_factory(factory, clean_tmp=False, repository="git://git.openembedded.net/openembedded", branch="stable/2009"): factory.addStep(source.Git(repourl=repository, branch=branch, mode='update')) if clean_tmp: factory.addStep(ShellCommand, description=["Cleaning", "tmp"], command="/bin/rm tmp || /bin/true", timeout=600) else: factory.addStep(ShellCommand, description=["Cleaning", "previous", "targets"], command="/bin/rm tmp/deploy/*/images/*/*rootfs* || /bin/true", timeout=600) factory.addStep(ShellCommand, description=["Cleaning", "previous", "targets", "step 2"], command="/bin/rm -rf tmp/deploy/*/images/*/*testlab* || /bin/true", timeout=600) # ------------------------------------------------------------------------------------------------------------------------------------------------ defaultenv = {} machines_glibc = ['at91sam9263ek', 'beagleboard', 'qemux86', 'vortex86sx', 'bug'] machines_uclibc = ['at91sam9263ek', 'beagleboard', 'qemux86', 'atngw100', 'bug'] targets_glibc = ['console-image', 'x11-image'] targets_uclibc = ['console-image', 'x11-image'] angstrom_glibc_incremental_build = factory.BuildFactory() bbot_initialize_factory(angstrom_glibc_incremental_build) defaultenv['ANGSTROMLIBC'] = 'glibc' for machine in machines_glibc: defaultenv['MACHINE'] = machine for target in targets_glibc: bbot_build_oe_target(angstrom_glibc_incremental_build, target) angstrom_glibc_full_build = factory.BuildFactory() bbot_initialize_factory(angstrom_glibc_full_build, True) defaultenv['ANGSTROMLIBC'] = 'glibc' for machine in machines_glibc: defaultenv['MACHINE'] = machine for target in targets_glibc: bbot_build_oe_target(angstrom_glibc_full_build, target) angstrom_uclibc_incremental_build = factory.BuildFactory() bbot_initialize_factory(angstrom_uclibc_incremental_build) defaultenv['ANGSTROMLIBC'] = 'uclibc' for machine in machines_uclibc: defaultenv['MACHINE'] = machine for target in targets_uclibc: bbot_build_oe_target(angstrom_uclibc_incremental_build, target) angstrom_uclibc_full_build = factory.BuildFactory() bbot_initialize_factory(angstrom_uclibc_full_build, True) defaultenv['ANGSTROMLIBC'] = 'uclibc' for machine in machines_uclibc: defaultenv['MACHINE'] = machine for target in targets_uclibc: bbot_build_oe_target(angstrom_uclibc_full_build, target) # ------------------------------------------------------------------------------------------------------------------------------------------------ config = BuildmasterConfig = {} config['projectName'] = "HaeRWu buildbot" config['buildbotURL'] = "http://localhost:8010/" config['slaves'] = [BuildSlave("homeQuad", "BOT-PASSWORD")] Config['slavePortnum'] = 9989 config['schedulers'] = [] config['schedulers'].append(Nightly(name="Angstrom glibc full build", hour=23, minute=0, dayOfWeek=[0,2,4], builderNames=["angstrom_glibc_full_build"])) config['schedulers'].append(Nightly(name="Angstrom glibc incremental build", hour=5, minute=0, dayOfWeek=[0,2,4], builderNames=["angstrom_glibc_incremental_build"])) config['schedulers'].append(Nightly(name="Angstrom uclibc full build", hour=23, minute=0, dayOfWeek=[1,3,5], builderNames=["angstrom_uclibc_full_build"])) config['schedulers'].append(Nightly(name="Angstrom uclibc incremental build", hour=5, minute=0, dayOfWeek=[1,3,5], builderNames=["angstrom_uclibc_incremental_build"])) #--------------------------------------------------------------------- build_agf = { 'name': "angstrom_glibc_full_build", 'slavename': "homeQuad", 'builddir': "angstrom_glibc_full_build", 'factory': angstrom_glibc_full_build, } build_agi = { 'name': "angstrom_glibc_incremental_build", 'slavename': "homeQuad", 'builddir': "angstrom_glibc_incremental_build", 'factory': angstrom_glibc_incremental_build, } build_auf = { 'name': "angstrom_uclibc_full_build", 'slavename': "homeQuad", 'builddir': "angstrom_uclibc_full_build", 'factory': angstrom_uclibc_full_build, } build_aui = { 'name': "angstrom_uclibc_incremental_build", 'slavename': "homeQuad", 'builddir': "angstrom_uclibc_incremental_build", 'factory': angstrom_uclibc_incremental_build, } config['builders'] = [build_agf, build_agi, build_auf, build_aui ] config['status'] = [] config['debugPassword'] = "" config['status'].append(html.WebStatus(http_port=8010, allowForce=True)) config['status'].append(html.WebStatus(http_port=8011, allowForce=False))