config: Restructured
Signed-off-by: Thomas Klaehn <thomas.klaehn@perinet.io>
This commit is contained in:
parent
01bee64778
commit
0769741a64
@ -1,4 +1,4 @@
|
||||
from .change_sources import append
|
||||
from .schedulers import append
|
||||
from .workers import append
|
||||
#from .change_sources import append
|
||||
#from .schedulers import append
|
||||
#from .workers import append
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,5 +1,7 @@
|
||||
from .ads1115 import append
|
||||
from .beaglebone_yocto import append
|
||||
from .raspberrypi3_64 import append
|
||||
from .raspberrypi4_64 import append
|
||||
from .bicycle_statistics import append
|
||||
from .gpio_ftdi import append
|
||||
from .gpio_sys import append
|
||||
@ -7,4 +9,5 @@ from .i2c_bb import append
|
||||
from .periflash import append
|
||||
from .test_c import append
|
||||
from .voltage_app import append
|
||||
from .pinetime import append
|
||||
|
||||
|
@ -7,8 +7,7 @@ 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'])
|
||||
COMMANDS.append(['bash', '-c', 'MACHINE=beaglebone-yocto 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)
|
||||
@ -21,22 +20,24 @@ 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'])
|
||||
beaglebone_yocto_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
|
||||
beaglebone_yocto_builder = util.BuilderConfig(name='beaglebone_yocto_builder',
|
||||
workernames=["buildbot-oe-worker"],
|
||||
beaglebone_yocto_builder = util.BuilderConfig(name='beaglebone_yocto',
|
||||
workernames=["buildbot-worker-openembedded"],
|
||||
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"])
|
||||
treeStableTimer=None, builderNames=["beaglebone_yocto"])
|
||||
|
||||
force_scheduler = schedulers.ForceScheduler(name="force_beaglebone-yocto", builderNames=["beaglebone_yocto_builder"])
|
||||
force_scheduler = schedulers.ForceScheduler(name="force_beaglebone-yocto", builderNames=["beaglebone_yocto"])
|
||||
|
||||
|
||||
def append(c):
|
||||
|
@ -5,7 +5,8 @@ REPOYRL_PYTHON = 'https://git.blackfinn.de/python/bicycle-statistics.git'
|
||||
BRANCH = util.Property('branch', default='master')
|
||||
|
||||
COMMANDS = []
|
||||
COMMANDS.append(['docker', 'build', '--no-cache', '-t', 'bicycle-statistics', '.'])
|
||||
COMMANDS.append(['git', 'clone', '--branch', BRANCH, REPOURL_DOCKER])
|
||||
COMMANDS.append(['docker', 'build', '--no-cache', '-t', 'bicycle-statistics', './bicycle-statistics'])
|
||||
COMMANDS.append(['docker', 'rm', '-f', 'bicycle-statistics'])
|
||||
COMMANDS.append(['docker', 'run', '-d', '-v',
|
||||
'/srv/nextcloud/data/tkl/files/Bicycle:/bs_in', '-v',
|
||||
@ -24,20 +25,18 @@ cs_bicycle_docker = changes.GitPoller(project='bicycle-statistics-docker',
|
||||
|
||||
# Factory
|
||||
factory = util.BuildFactory()
|
||||
factory.addStep(steps.Git(repourl=REPOURL_DOCKER, branch=BRANCH))
|
||||
|
||||
for cmd in COMMANDS:
|
||||
factory.addStep(steps.ShellCommand(command=cmd))
|
||||
|
||||
# Worker
|
||||
bicycle_worker = worker.DockerLatentWorker('buildbot-docker-worker', 'pass',
|
||||
docker_host='tcp://192.168.178.39:2375',
|
||||
image='buildbot-docker-worker',
|
||||
bicycle_worker = worker.DockerLatentWorker('buildbot-worker-docker', 'pass',
|
||||
docker_host='tcp://192.168.178.82:2375',
|
||||
image='buildbot-worker-docker',
|
||||
volumes=['/var/run/docker.sock:/var/run/docker.sock'])
|
||||
|
||||
# Builder
|
||||
bicycle_builder = util.BuilderConfig(name='bicycle_statistics',
|
||||
workernames=["buildbot-docker-worker"],
|
||||
workernames=["buildbot-worker-docker"],
|
||||
factory=factory)
|
||||
|
||||
# Schedulers
|
||||
|
36
config/builders/pinetime.py
Normal file
36
config/builders/pinetime.py
Normal file
@ -0,0 +1,36 @@
|
||||
from buildbot.plugins import changes, schedulers, steps, util, worker
|
||||
|
||||
REPOURL = 'https://git.blackfinn.de/smartwatch/narf52.git'
|
||||
|
||||
# Change sources
|
||||
cs = changes.GitPoller(project='narf52', repourl=REPOURL, branches=True, pollInterval=60)
|
||||
|
||||
# Factory
|
||||
factory = util.BuildFactory()
|
||||
factory.addStep(steps.Git(repourl=REPOURL, mode='full'))
|
||||
factory.addStep(steps.Compile(command=['APPLICATION=blinky', 'PLATFORM=nrf52', 'make', 'all', '-j8']))
|
||||
|
||||
# Worker
|
||||
arm_none_eabi_worker = worker.DockerLatentWorker('buildbot-worker-arm-none-eabi', 'pass', docker_host='tcp://192.168.178.82:2375', image='buildbot-worker-arm-none-eabi')
|
||||
|
||||
# Builder
|
||||
builder = util.BuilderConfig(name='pinetime', workernames=["buildbot-worker-arm-none-eabi"],
|
||||
factory=factory)
|
||||
|
||||
# Scheduler
|
||||
# Schedulers
|
||||
change_scheduler = schedulers.SingleBranchScheduler(name="narf52",
|
||||
change_filter=util.ChangeFilter(project=['narf52']),
|
||||
treeStableTimer=None, builderNames=["pinetime"])
|
||||
|
||||
force_scheduler = schedulers.ForceScheduler(name="force_pinetime", builderNames=["pinetime"])
|
||||
|
||||
|
||||
def append(c):
|
||||
c['change_source'].append(cs)
|
||||
c['workers'].append(arm_none_eabi_worker)
|
||||
c['builders'].append(builder)
|
||||
c['schedulers'].append(change_scheduler)
|
||||
c['schedulers'].append(force_scheduler)
|
||||
return c
|
||||
|
51
config/builders/raspberrypi3_64.py
Normal file
51
config/builders/raspberrypi3_64.py
Normal file
@ -0,0 +1,51 @@
|
||||
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=raspberrypi3-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
|
||||
rpi3_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
|
||||
rpi3_builder = util.BuilderConfig(name='raspberrypi3-64',
|
||||
workernames=["buildbot-worker-openembedded"],
|
||||
factory=factory)
|
||||
|
||||
# Schedulers
|
||||
change_scheduler = schedulers.SingleBranchScheduler(name="raspberrypi3-64",
|
||||
change_filter=util.ChangeFilter(project=['linux-yocto', 'meta-blackfinn']),
|
||||
treeStableTimer=None, builderNames=["raspberrypi3-64"])
|
||||
|
||||
force_scheduler = schedulers.ForceScheduler(name="force_raspberrypi3-64", builderNames=["raspberrypi3-64"])
|
||||
|
||||
|
||||
def append(c):
|
||||
c['change_source'].append(cs_linux_yocto)
|
||||
c['change_source'].append(cs_meta_bf)
|
||||
c['workers'].append(rpi3_worker)
|
||||
c['builders'].append(rpi3_builder)
|
||||
c['schedulers'].append(change_scheduler)
|
||||
c['schedulers'].append(force_scheduler)
|
||||
return c
|
||||
|
51
config/builders/raspberrypi4_64.py
Normal file
51
config/builders/raspberrypi4_64.py
Normal file
@ -0,0 +1,51 @@
|
||||
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
|
||||
|
@ -1,38 +0,0 @@
|
||||
from buildbot.plugins import changes
|
||||
|
||||
cs_test_c = changes.GitPoller(project='test.c',
|
||||
repourl='https://git.blackfinn.de/tkl/test.c.git',
|
||||
branches=True, pollInterval=300)
|
||||
|
||||
## gpio_ftdi
|
||||
#cs_gpio_ftdi = changes.GitPoller(project='gpio_ftdi',
|
||||
# repourl='https://git.blackfinn.de/adc_gpio_i2c/gpio_ftdi.git',
|
||||
# branches=True, pollInterval=60)
|
||||
## gpio_sys
|
||||
#cs_gpio_sys = changes.GitPoller(project='gpio_sys',
|
||||
# repourl='https://git.blackfinn.de/adc_gpio_i2c/gpio_sys.git',
|
||||
# branches=True, pollInterval=60)
|
||||
## i2c_bb
|
||||
#cs_i2c_bb = changes.GitPoller(project='i2c_bb',
|
||||
# repourl='https://git.blackfinn.de/adc_gpio_i2c/i2c_bb.git',
|
||||
# branches=True, pollInterval=60)
|
||||
|
||||
## ads1115
|
||||
#cs_ads1115 = changes.GitPoller(project='ads1115',
|
||||
# repourl='https://git.blackfinn.de/adc_gpio_i2c/ads1115.git',
|
||||
# branches=True, pollInterval=60)
|
||||
|
||||
## voltage_app
|
||||
#cs_voltage_app = changes.GitPoller(project='voltage_app',
|
||||
# repourl='https://git.blackfinn.de/adc_gpio_i2c/voltage_app.git',
|
||||
# branches=True, pollInterval=60)
|
||||
|
||||
def append(change_sources):
|
||||
change_sources.append(cs_test_c)
|
||||
# change_sources.append(cs_gpio_ftdi)
|
||||
# change_sources.append(cs_gpio_sys)
|
||||
# change_sources.append(cs_i2c_bb)
|
||||
# change_sources.append(cs_ads1115)
|
||||
# change_sources.append(cs_voltage_app)
|
||||
return change_sources
|
||||
|
@ -1,53 +0,0 @@
|
||||
from buildbot.plugins import schedulers, util
|
||||
|
||||
sched_a1 = schedulers.SingleBranchScheduler(name="test_c",
|
||||
change_filter=util.ChangeFilter(project='test.c'),
|
||||
treeStableTimer=None, builderNames=["test.c"])
|
||||
sched_a2 = schedulers.ForceScheduler(name="force_test_c", builderNames=["test.c"])
|
||||
|
||||
#sched_b1 = schedulers.SingleBranchScheduler(name="gpio_ftdi",
|
||||
# change_filter=util.ChangeFilter(project='gpio_ftdi'),
|
||||
# treeStableTimer=None, builderNames=["gpio_ftdi"])
|
||||
|
||||
#sched_b2 = schedulers.ForceScheduler(name="force_gpio_ftdi", builderNames=["gpio_ftdi"])
|
||||
|
||||
#sched_c1 = schedulers.SingleBranchScheduler(name="gpio_sys",
|
||||
# change_filter=util.ChangeFilter(project='gpio_sys'),
|
||||
# treeStableTimer=None, builderNames=["gpio_sys"])
|
||||
#sched_c2 = schedulers.ForceScheduler(name="force_gpio_sys", builderNames=["gpio_sys"])
|
||||
|
||||
#sched_d1 = schedulers.SingleBranchScheduler(name="i2c_bb",
|
||||
# change_filter=util.ChangeFilter(project='i2c_bb'),
|
||||
# treeStableTimer=None, builderNames=["i2c_bb"])
|
||||
|
||||
#sched_d2 = schedulers.ForceScheduler(name="force_i2c_bb", builderNames=["i2c_bb"])
|
||||
|
||||
#sched_e1 = schedulers.SingleBranchScheduler(name="ads1115",
|
||||
# change_filter=util.ChangeFilter(project=['i2c_bb', 'ads1115']),
|
||||
# treeStableTimer=None, builderNames=["ads1115"])
|
||||
|
||||
#sched_e2 = schedulers.ForceScheduler(name="force_ads1115", builderNames=["ads1115"])
|
||||
|
||||
#sched_f1 = schedulers.SingleBranchScheduler(name="voltage_app",
|
||||
# change_filter=util.ChangeFilter(project=['voltage_app',
|
||||
# 'ads1115',
|
||||
# 'i2c_bb']),
|
||||
# treeStableTimer=None, builderNames=["voltage_app"])
|
||||
|
||||
#sched_f2 = schedulers.ForceScheduler(name="force_voltage_app", builderNames=["voltage_app"])
|
||||
|
||||
def append(schedulers):
|
||||
schedulers.append(sched_a1)
|
||||
schedulers.append(sched_a2)
|
||||
# schedulers.append(sched_b1)
|
||||
# schedulers.append(sched_b2)
|
||||
# schedulers.append(sched_c1)
|
||||
# schedulers.append(sched_c2)
|
||||
# schedulers.append(sched_d1)
|
||||
# schedulers.append(sched_d2)
|
||||
# schedulers.append(sched_e1)
|
||||
# schedulers.append(sched_e2)
|
||||
# schedulers.append(sched_f1)
|
||||
# schedulers.append(sched_f2)
|
||||
return schedulers
|
||||
|
@ -1,10 +0,0 @@
|
||||
from buildbot.plugins import worker
|
||||
|
||||
cpp_worker = worker.DockerLatentWorker('buildbot-cpp-worker', 'pass',
|
||||
docker_host='tcp://192.168.178.39:2375',
|
||||
image='buildbot-cpp-worker')
|
||||
|
||||
def append(workers):
|
||||
workers.append(cpp_worker)
|
||||
return workers
|
||||
|
10
master.cfg
10
master.cfg
@ -3,10 +3,7 @@
|
||||
|
||||
from buildbot.plugins import *
|
||||
|
||||
#import config.workers
|
||||
import config.change_sources
|
||||
import config.schedulers
|
||||
from config.builders import *
|
||||
import config.builders
|
||||
|
||||
c = BuildmasterConfig = {}
|
||||
|
||||
@ -18,9 +15,10 @@ c['change_source'] = []
|
||||
c['schedulers'] = []
|
||||
c['builders'] = []
|
||||
|
||||
c = config.builders.periflash.append(c)
|
||||
c = config.builders.bicycle_statistics.append(c)
|
||||
c = config.builders.beaglebone_yocto.append(c)
|
||||
c = config.builders.raspberrypi3_64.append(c)
|
||||
c = config.builders.raspberrypi4_64.append(c)
|
||||
c = config.builders.bicycle_statistics.append(c)
|
||||
|
||||
####### BUILDBOT SERVICES
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user