0769741a64
Signed-off-by: Thomas Klaehn <thomas.klaehn@perinet.io>
52 lines
2.4 KiB
Python
52 lines
2.4 KiB
Python
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=raspberrypi4-64 source blackfinn-init-build-env; echo "DL_DIR ?= \\"/yocto/downloads\\"" >> conf/local.conf; echo "SSTATE_DIR ?= \\"/yocto/sstate-cache\\"" >> conf/local.conf; cat conf/local.conf; bitbake docker-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
|
|
rpi4_worker = worker.DockerLatentWorker('buildbot-worker-openembedded', 'pass',
|
|
docker_host='tcp://192.168.178.82:2375',
|
|
image='buildbot-worker-openembedded',
|
|
volumes=['/var/run/docker.sock:/var/run/docker.sock',
|
|
'/srv/yocto/sstate-cache:/yocto/sstate-cache',
|
|
'/srv/yocto/downloads:/yocto/downloads'])
|
|
|
|
# Builder
|
|
rpi4_builder = util.BuilderConfig(name='raspberrypi4-64',
|
|
workernames=["buildbot-worker-openembedded"],
|
|
factory=factory)
|
|
|
|
# Schedulers
|
|
change_scheduler = schedulers.SingleBranchScheduler(name="raspberrypi4-64",
|
|
change_filter=util.ChangeFilter(project=['linux-yocto', 'meta-blackfinn']),
|
|
treeStableTimer=None, builderNames=["raspberrypi4-64"])
|
|
|
|
force_scheduler = schedulers.ForceScheduler(name="force_raspberrypi4-64", builderNames=["raspberrypi4-64"])
|
|
|
|
|
|
def append(c):
|
|
c['change_source'].append(cs_linux_yocto)
|
|
c['change_source'].append(cs_meta_bf)
|
|
c['workers'].append(rpi4_worker)
|
|
c['builders'].append(rpi4_builder)
|
|
c['schedulers'].append(change_scheduler)
|
|
c['schedulers'].append(force_scheduler)
|
|
return c
|
|
|