diff --git a/.gitignore b/.gitignore index 908440b..6ecd6d3 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ master.cfg.sample state.sqlite twistd.log* twistd.pid +*.pyc diff --git a/config/builders/__init__.py b/config/builders/__init__.py index 8555343..199b62c 100644 --- a/config/builders/__init__.py +++ b/config/builders/__init__.py @@ -1,4 +1,5 @@ from .ads1115 import append +from .beaglebone_yocto import append from .bicycle_statistics import append from .gpio_ftdi import append from .gpio_sys import append diff --git a/config/builders/__pycache__/__init__.cpython-36.pyc b/config/builders/__pycache__/__init__.cpython-36.pyc deleted file mode 100644 index b61dd1c..0000000 Binary files a/config/builders/__pycache__/__init__.cpython-36.pyc and /dev/null differ diff --git a/config/builders/__pycache__/bicycle_statistics.cpython-36.pyc b/config/builders/__pycache__/bicycle_statistics.cpython-36.pyc deleted file mode 100644 index 0a89df6..0000000 Binary files a/config/builders/__pycache__/bicycle_statistics.cpython-36.pyc and /dev/null differ diff --git a/config/builders/beaglebone_yocto.py b/config/builders/beaglebone_yocto.py new file mode 100644 index 0000000..def0c4b --- /dev/null +++ b/config/builders/beaglebone_yocto.py @@ -0,0 +1,50 @@ +from buildbot.plugins import changes, schedulers, steps, util, worker + +REPOURL_MANIFEST = 'https://git.blackfinn.de/yocto/linux-blackfinn.git' +REPOURL_META_BLACKFINN = 'https://git.blackfinn.de/yocto/meta-blackfinn.git' +BRANCH = util.Property('branch', default='master') + +COMMANDS = [] +COMMANDS.append(['repo', 'init', '-u', REPOURL_MANIFEST]) +COMMANDS.append(['repo', 'sync']) +COMMANDS.append(['bash', '-c', 'MACHINE=beaglebone-yocto source blackfinn-init-build-env; bitbake console-image']) +COMMANDS.append(['bash', '-c', 'MACHINE=beaglebone-yocto source blackfinn-init-build-env; bitbake console-dev-image']) + +# Change sources +cs_linux_yocto = changes.GitPoller(project='linux-yocto', repourl=REPOURL_MANIFEST, branches=True, pollInterval=60) +cs_meta_bf = changes.GitPoller(project='meta-blackfinn', repourl=REPOURL_META_BLACKFINN, branches=True, pollInterval=60) + +# Factory +factory = util.BuildFactory() + +for cmd in COMMANDS: + factory.addStep(steps.ShellCommand(command=cmd)) + +# Worker +beaglebone_yocto_worker = worker.DockerLatentWorker('buildbot-oe-worker', 'pass', + docker_host='tcp://192.168.178.39:2375', + image='buildbot-oe-worker', + volumes=['/var/run/docker.sock:/var/run/docker.sock']) + +# Builder +beaglebone_yocto_builder = util.BuilderConfig(name='beaglebone_yocto_builder', + workernames=["buildbot-oe-worker"], + factory=factory) + +# Schedulers +change_scheduler = schedulers.SingleBranchScheduler(name="beaglebone-yocto", + change_filter=util.ChangeFilter(project=['linux-yocto', 'meta-blackfinn']), + treeStableTimer=None, builderNames=["beaglebone_yocto_builder"]) + +force_scheduler = schedulers.ForceScheduler(name="force_beaglebone-yocto", builderNames=["beaglebone_yocto_builder"]) + + +def append(c): + c['change_source'].append(cs_linux_yocto) + c['change_source'].append(cs_meta_bf) + c['workers'].append(beaglebone_yocto_worker) + c['builders'].append(beaglebone_yocto_builder) + c['schedulers'].append(change_scheduler) + c['schedulers'].append(force_scheduler) + return c + diff --git a/master.cfg b/master.cfg index 82d2276..e80d284 100644 --- a/master.cfg +++ b/master.cfg @@ -20,6 +20,7 @@ c['builders'] = [] c = config.builders.periflash.append(c) c = config.builders.bicycle_statistics.append(c) +c = config.builders.beaglebone_yocto.append(c) ####### BUILDBOT SERVICES