restructure config
This commit is contained in:
parent
3bcb9924fe
commit
f68a38b7a2
@ -0,0 +1,4 @@
|
|||||||
|
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.
@ -0,0 +1,9 @@
|
|||||||
|
from .ads1115 import append
|
||||||
|
from .bicycle_statistics import append
|
||||||
|
from .gpio_ftdi import append
|
||||||
|
from .gpio_sys import append
|
||||||
|
from .i2c_bb import append
|
||||||
|
from .periflash import append
|
||||||
|
from .test_c import append
|
||||||
|
from .voltage_app import append
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
config/builders/__pycache__/periflash.cpython-36.pyc
Normal file
BIN
config/builders/__pycache__/periflash.cpython-36.pyc
Normal file
Binary file not shown.
@ -1,19 +1,60 @@
|
|||||||
from buildbot.plugins import steps, util
|
from buildbot.plugins import changes, schedulers, steps, util, worker
|
||||||
|
|
||||||
|
REPOURL_DOCKER = 'https://git.blackfinn.de/docker/bicycle-statistics.git'
|
||||||
|
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(['docker', 'rm', '-f', 'bicycle-statistics'])
|
||||||
|
COMMANDS.append(['docker', 'run', '-d', '-v',
|
||||||
|
'/srv/nextcloud/data/tkl/files/Bicycle:/bs_in', '-v',
|
||||||
|
'/srv/bicycle.blackfinn.de/data:/bs_out', '--name',
|
||||||
|
'bicycle-statistics', '--restart', 'always', 'bicycle-statistics'])
|
||||||
|
|
||||||
|
# Change sources
|
||||||
|
cs_bicycle_python = changes.GitPoller(project='bicycle-statistics-python',
|
||||||
|
repourl=REPOYRL_PYTHON,
|
||||||
|
branches=True, pollInterval=60)
|
||||||
|
|
||||||
|
cs_bicycle_docker = changes.GitPoller(project='bicycle-statistics-docker',
|
||||||
|
repourl=REPOURL_DOCKER,
|
||||||
|
branches=True, pollInterval=60)
|
||||||
|
|
||||||
|
|
||||||
|
# Factory
|
||||||
factory = util.BuildFactory()
|
factory = util.BuildFactory()
|
||||||
factory.addStep(steps.ShellCommand(command=['git', 'clone', '--branch', 'master',
|
factory.addStep(steps.Git(repourl=REPOURL_DOCKER, branch=BRANCH))
|
||||||
'https://git.blackfinn.de/docker/bicycle-statistics.git']))
|
|
||||||
factory.addStep(steps.ShellCommand(command=['docker', 'build', '--no-cache', '-t', 'bicycle-statistics',
|
|
||||||
'./bicycle-statistics']))
|
|
||||||
factory.addStep(steps.ShellCommand(command=['docker', 'rm', '-f', 'bicycle-statistics']))
|
|
||||||
factory.addStep(steps.ShellCommand(command=['docker', 'run', '-d', '-v', '/srv/nextcloud/data/tkl/files/Bicycle:/bs_in',
|
|
||||||
'-v', '/srv/bicycle.blackfinn.de/data:/bs_out', '--name',
|
|
||||||
'bicycle-statistics', '--restart', 'always', 'bicycle-statistics']))
|
|
||||||
|
|
||||||
builder = util.BuilderConfig(name='bicycle_statistics', workernames=["buildbot-cpp-worker"],
|
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',
|
||||||
|
volumes=['/var/run/docker.sock:/var/run/docker.sock'])
|
||||||
|
|
||||||
|
# Builder
|
||||||
|
bicycle_builder = util.BuilderConfig(name='bicycle_statistics',
|
||||||
|
workernames=["buildbot-docker-worker"],
|
||||||
factory=factory)
|
factory=factory)
|
||||||
|
|
||||||
def append(builders):
|
# Schedulers
|
||||||
builders.append(builder)
|
change_scheduler = schedulers.SingleBranchScheduler(name="bicycle_statistics",
|
||||||
return builders
|
change_filter=util.ChangeFilter(project=['bicycle-statistics-python',
|
||||||
|
'bicycle-statistics-docker']),
|
||||||
|
treeStableTimer=None, builderNames=["bicycle_statistics"])
|
||||||
|
|
||||||
|
force_scheduler = schedulers.ForceScheduler(name="force_bicycle-statistics", builderNames=["bicycle_statistics"])
|
||||||
|
|
||||||
|
|
||||||
|
def append(c):
|
||||||
|
c['change_source'].append(cs_bicycle_python)
|
||||||
|
c['change_source'].append(cs_bicycle_docker)
|
||||||
|
c['workers'].append(bicycle_worker)
|
||||||
|
c['builders'].append(bicycle_builder)
|
||||||
|
c['schedulers'].append(change_scheduler)
|
||||||
|
c['schedulers'].append(force_scheduler)
|
||||||
|
return c
|
||||||
|
|
||||||
|
25
config/builders/periflash.py
Normal file
25
config/builders/periflash.py
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
from buildbot.plugins import schedulers, steps, util, worker
|
||||||
|
|
||||||
|
factory = util.BuildFactory()
|
||||||
|
factory.addStep(steps.GitLab(repourl='git@gitlab.com:tkla/periflash.git',
|
||||||
|
branch=util.Property('branch', default='master')))
|
||||||
|
|
||||||
|
periflash_worker = worker.DockerLatentWorker('periflash-worker', 'pass',
|
||||||
|
docker_host='tcp://192.168.178.39:2375',
|
||||||
|
image='buildbot-cpp-worker')
|
||||||
|
|
||||||
|
|
||||||
|
builder = util.BuilderConfig(name='periflash',
|
||||||
|
workernames=['periflash-worker'],
|
||||||
|
factory=factory)
|
||||||
|
|
||||||
|
scheduler = schedulers.SingleBranchScheduler(name="periflash",
|
||||||
|
change_filter=util.ChangeFilter(project='periflash', branch=util.Property('branch', default='master')),
|
||||||
|
treeStableTimer=None, builderNames=["periflash"])
|
||||||
|
|
||||||
|
def append(c):
|
||||||
|
c['workers'].append(periflash_worker)
|
||||||
|
c['builders'].append(builder)
|
||||||
|
c['schedulers'].append(scheduler)
|
||||||
|
|
||||||
|
return c
|
@ -5,45 +5,34 @@ cs_test_c = changes.GitPoller(project='test.c',
|
|||||||
branches=True, pollInterval=300)
|
branches=True, pollInterval=300)
|
||||||
|
|
||||||
## gpio_ftdi
|
## gpio_ftdi
|
||||||
cs_gpio_ftdi = changes.GitPoller(project='gpio_ftdi',
|
#cs_gpio_ftdi = changes.GitPoller(project='gpio_ftdi',
|
||||||
repourl='https://git.blackfinn.de/adc_gpio_i2c/gpio_ftdi.git',
|
# repourl='https://git.blackfinn.de/adc_gpio_i2c/gpio_ftdi.git',
|
||||||
branches=True, pollInterval=60)
|
# branches=True, pollInterval=60)
|
||||||
## gpio_sys
|
## gpio_sys
|
||||||
cs_gpio_sys = changes.GitPoller(project='gpio_sys',
|
#cs_gpio_sys = changes.GitPoller(project='gpio_sys',
|
||||||
repourl='https://git.blackfinn.de/adc_gpio_i2c/gpio_sys.git',
|
# repourl='https://git.blackfinn.de/adc_gpio_i2c/gpio_sys.git',
|
||||||
branches=True, pollInterval=60)
|
# branches=True, pollInterval=60)
|
||||||
## i2c_bb
|
## i2c_bb
|
||||||
cs_i2c_bb = changes.GitPoller(project='i2c_bb',
|
#cs_i2c_bb = changes.GitPoller(project='i2c_bb',
|
||||||
repourl='https://git.blackfinn.de/adc_gpio_i2c/i2c_bb.git',
|
# repourl='https://git.blackfinn.de/adc_gpio_i2c/i2c_bb.git',
|
||||||
branches=True, pollInterval=60)
|
# branches=True, pollInterval=60)
|
||||||
|
|
||||||
## ads1115
|
## ads1115
|
||||||
cs_ads1115 = changes.GitPoller(project='ads1115',
|
#cs_ads1115 = changes.GitPoller(project='ads1115',
|
||||||
repourl='https://git.blackfinn.de/adc_gpio_i2c/ads1115.git',
|
# repourl='https://git.blackfinn.de/adc_gpio_i2c/ads1115.git',
|
||||||
branches=True, pollInterval=60)
|
# branches=True, pollInterval=60)
|
||||||
|
|
||||||
## voltage_app
|
## voltage_app
|
||||||
cs_voltage_app = changes.GitPoller(project='voltage_app',
|
#cs_voltage_app = changes.GitPoller(project='voltage_app',
|
||||||
repourl='https://git.blackfinn.de/adc_gpio_i2c/voltage_app.git',
|
# repourl='https://git.blackfinn.de/adc_gpio_i2c/voltage_app.git',
|
||||||
branches=True, pollInterval=60)
|
# branches=True, pollInterval=60)
|
||||||
|
|
||||||
## bicycle-statistics
|
|
||||||
cs_bicycle_python = changes.GitPoller(project='bicycle-statistics-python',
|
|
||||||
repourl='https://git.blackfinn.de/python/bicycle-statistics.git',
|
|
||||||
branches=True, pollInterval=60)
|
|
||||||
cs_bicycle_docker = changes.GitPoller(project='bicycle-statistics-docker',
|
|
||||||
repourl='https://git.blackfinn.de/docker/bicycle-statistics.git',
|
|
||||||
branches=True, pollInterval=60)
|
|
||||||
|
|
||||||
|
|
||||||
def append(change_sources):
|
def append(change_sources):
|
||||||
change_sources.append(cs_test_c)
|
change_sources.append(cs_test_c)
|
||||||
change_sources.append(cs_gpio_ftdi)
|
# change_sources.append(cs_gpio_ftdi)
|
||||||
change_sources.append(cs_gpio_sys)
|
# change_sources.append(cs_gpio_sys)
|
||||||
change_sources.append(cs_i2c_bb)
|
# change_sources.append(cs_i2c_bb)
|
||||||
change_sources.append(cs_ads1115)
|
# change_sources.append(cs_ads1115)
|
||||||
change_sources.append(cs_voltage_app)
|
# change_sources.append(cs_voltage_app)
|
||||||
change_sources.append(cs_bicycle_python)
|
|
||||||
change_sources.append(cs_bicycle_docker)
|
|
||||||
return change_sources
|
return change_sources
|
||||||
|
|
||||||
|
@ -5,59 +5,49 @@ sched_a1 = schedulers.SingleBranchScheduler(name="test_c",
|
|||||||
treeStableTimer=None, builderNames=["test.c"])
|
treeStableTimer=None, builderNames=["test.c"])
|
||||||
sched_a2 = schedulers.ForceScheduler(name="force_test_c", builderNames=["test.c"])
|
sched_a2 = schedulers.ForceScheduler(name="force_test_c", builderNames=["test.c"])
|
||||||
|
|
||||||
sched_b1 = schedulers.SingleBranchScheduler(name="gpio_ftdi",
|
#sched_b1 = schedulers.SingleBranchScheduler(name="gpio_ftdi",
|
||||||
change_filter=util.ChangeFilter(project='gpio_ftdi'),
|
# change_filter=util.ChangeFilter(project='gpio_ftdi'),
|
||||||
treeStableTimer=None, builderNames=["gpio_ftdi"])
|
# treeStableTimer=None, builderNames=["gpio_ftdi"])
|
||||||
|
|
||||||
sched_b2 = schedulers.ForceScheduler(name="force_gpio_ftdi", builderNames=["gpio_ftdi"])
|
#sched_b2 = schedulers.ForceScheduler(name="force_gpio_ftdi", builderNames=["gpio_ftdi"])
|
||||||
|
|
||||||
sched_c1 = schedulers.SingleBranchScheduler(name="gpio_sys",
|
#sched_c1 = schedulers.SingleBranchScheduler(name="gpio_sys",
|
||||||
change_filter=util.ChangeFilter(project='gpio_sys'),
|
# change_filter=util.ChangeFilter(project='gpio_sys'),
|
||||||
treeStableTimer=None, builderNames=["gpio_sys"])
|
# treeStableTimer=None, builderNames=["gpio_sys"])
|
||||||
sched_c2 = schedulers.ForceScheduler(name="force_gpio_sys", builderNames=["gpio_sys"])
|
#sched_c2 = schedulers.ForceScheduler(name="force_gpio_sys", builderNames=["gpio_sys"])
|
||||||
|
|
||||||
sched_d1 = schedulers.SingleBranchScheduler(name="i2c_bb",
|
#sched_d1 = schedulers.SingleBranchScheduler(name="i2c_bb",
|
||||||
change_filter=util.ChangeFilter(project='i2c_bb'),
|
# change_filter=util.ChangeFilter(project='i2c_bb'),
|
||||||
treeStableTimer=None, builderNames=["i2c_bb"])
|
# treeStableTimer=None, builderNames=["i2c_bb"])
|
||||||
|
|
||||||
sched_d2 = schedulers.ForceScheduler(name="force_i2c_bb", builderNames=["i2c_bb"])
|
#sched_d2 = schedulers.ForceScheduler(name="force_i2c_bb", builderNames=["i2c_bb"])
|
||||||
|
|
||||||
sched_e1 = schedulers.SingleBranchScheduler(name="ads1115",
|
#sched_e1 = schedulers.SingleBranchScheduler(name="ads1115",
|
||||||
change_filter=util.ChangeFilter(project=['i2c_bb', 'ads1115']),
|
# change_filter=util.ChangeFilter(project=['i2c_bb', 'ads1115']),
|
||||||
treeStableTimer=None, builderNames=["ads1115"])
|
# treeStableTimer=None, builderNames=["ads1115"])
|
||||||
|
|
||||||
sched_e2 = schedulers.ForceScheduler(name="force_ads1115", builderNames=["ads1115"])
|
#sched_e2 = schedulers.ForceScheduler(name="force_ads1115", builderNames=["ads1115"])
|
||||||
|
|
||||||
sched_f1 = schedulers.SingleBranchScheduler(name="voltage_app",
|
#sched_f1 = schedulers.SingleBranchScheduler(name="voltage_app",
|
||||||
change_filter=util.ChangeFilter(project=['voltage_app',
|
# change_filter=util.ChangeFilter(project=['voltage_app',
|
||||||
'ads1115',
|
# 'ads1115',
|
||||||
'i2c_bb']),
|
# 'i2c_bb']),
|
||||||
treeStableTimer=None, builderNames=["voltage_app"])
|
# treeStableTimer=None, builderNames=["voltage_app"])
|
||||||
|
|
||||||
sched_f2 = schedulers.ForceScheduler(name="force_voltage_app", builderNames=["voltage_app"])
|
|
||||||
|
|
||||||
sched_g1 = schedulers.SingleBranchScheduler(name="bicycle_statistics",
|
|
||||||
change_filter=util.ChangeFilter(project=['bicycle-statistics-python',
|
|
||||||
'bicycle-statistics-docker']),
|
|
||||||
treeStableTimer=None, builderNames=["bicycle_statistics"])
|
|
||||||
|
|
||||||
sched_g2 = schedulers.ForceScheduler(name="force_bicycle-statistics", builderNames=["bicycle_statistics"])
|
|
||||||
|
|
||||||
|
#sched_f2 = schedulers.ForceScheduler(name="force_voltage_app", builderNames=["voltage_app"])
|
||||||
|
|
||||||
def append(schedulers):
|
def append(schedulers):
|
||||||
schedulers.append(sched_a1)
|
schedulers.append(sched_a1)
|
||||||
schedulers.append(sched_a2)
|
schedulers.append(sched_a2)
|
||||||
schedulers.append(sched_b1)
|
# schedulers.append(sched_b1)
|
||||||
schedulers.append(sched_b2)
|
# schedulers.append(sched_b2)
|
||||||
schedulers.append(sched_c1)
|
# schedulers.append(sched_c1)
|
||||||
schedulers.append(sched_c2)
|
# schedulers.append(sched_c2)
|
||||||
schedulers.append(sched_d1)
|
# schedulers.append(sched_d1)
|
||||||
schedulers.append(sched_d2)
|
# schedulers.append(sched_d2)
|
||||||
schedulers.append(sched_e1)
|
# schedulers.append(sched_e1)
|
||||||
schedulers.append(sched_e2)
|
# schedulers.append(sched_e2)
|
||||||
schedulers.append(sched_f1)
|
# schedulers.append(sched_f1)
|
||||||
schedulers.append(sched_f2)
|
# schedulers.append(sched_f2)
|
||||||
schedulers.append(sched_g1)
|
|
||||||
schedulers.append(sched_g2)
|
|
||||||
return schedulers
|
return schedulers
|
||||||
|
|
||||||
|
@ -4,13 +4,7 @@ cpp_worker = worker.DockerLatentWorker('buildbot-cpp-worker', 'pass',
|
|||||||
docker_host='tcp://192.168.178.39:2375',
|
docker_host='tcp://192.168.178.39:2375',
|
||||||
image='buildbot-cpp-worker')
|
image='buildbot-cpp-worker')
|
||||||
|
|
||||||
docker_worker = worker.DockerLatentWorker('buildbot-docker-worker', 'pass',
|
|
||||||
docker_host='tcp://192.168.178.39:2375',
|
|
||||||
image='buildbot-docker-worker',
|
|
||||||
volumes=['/var/run/docker.sock:/var/run/docker.sock'])
|
|
||||||
|
|
||||||
def append(workers):
|
def append(workers):
|
||||||
workers.append(cpp_worker)
|
workers.append(cpp_worker)
|
||||||
workers.append(docker_worker)
|
|
||||||
return workers
|
return workers
|
||||||
|
|
||||||
|
35
master.cfg
35
master.cfg
@ -3,39 +3,23 @@
|
|||||||
|
|
||||||
from buildbot.plugins import *
|
from buildbot.plugins import *
|
||||||
|
|
||||||
import config.workers
|
#import config.workers
|
||||||
import config.change_sources
|
import config.change_sources
|
||||||
import config.schedulers
|
import config.schedulers
|
||||||
import config.builders.test_c
|
from config.builders import *
|
||||||
import config.builders.gpio_ftdi
|
|
||||||
import config.builders.gpio_sys
|
|
||||||
import config.builders.i2c_bb
|
|
||||||
import config.builders.ads1115
|
|
||||||
import config.builders.voltage_app
|
|
||||||
import config.builders.bicycle_statistics
|
|
||||||
|
|
||||||
c = BuildmasterConfig = {}
|
c = BuildmasterConfig = {}
|
||||||
|
|
||||||
|
#c['secretsProviders'] = [secrets.SecretInAFile(dirname='.ssh/')]
|
||||||
|
|
||||||
c['workers'] = []
|
c['workers'] = []
|
||||||
c['workers'] = config.workers.append(c['workers'])
|
|
||||||
|
|
||||||
c['protocols'] = {'pb': {'port': 9989}}
|
c['protocols'] = {'pb': {'port': 9989}}
|
||||||
|
|
||||||
c['change_source'] = []
|
c['change_source'] = []
|
||||||
c['change_source'] = config.change_sources.append(c['change_source'])
|
|
||||||
|
|
||||||
c['schedulers'] = []
|
c['schedulers'] = []
|
||||||
c['schedulers'] = config.schedulers.append(c['schedulers'])
|
|
||||||
|
|
||||||
c['builders'] = []
|
c['builders'] = []
|
||||||
c['builders'] = config.builders.test_c.append(c['builders'])
|
|
||||||
c['builders'] = config.builders.gpio_ftdi.append(c['builders'])
|
|
||||||
c['builders'] = config.builders.gpio_sys.append(c['builders'])
|
|
||||||
c['builders'] = config.builders.i2c_bb.append(c['builders'])
|
|
||||||
c['builders'] = config.builders.ads1115.append(c['builders'])
|
|
||||||
c['builders'] = config.builders.voltage_app.append(c['builders'])
|
|
||||||
c['builders'] = config.builders.bicycle_statistics.append(c['builders'])
|
|
||||||
|
|
||||||
|
c = config.builders.periflash.append(c)
|
||||||
|
c = config.builders.bicycle_statistics.append(c)
|
||||||
|
|
||||||
####### BUILDBOT SERVICES
|
####### BUILDBOT SERVICES
|
||||||
|
|
||||||
@ -61,7 +45,12 @@ c['titleURL'] = "https://build.blackfinn.de/"
|
|||||||
c['buildbotURL'] = "https://build.blackfinn.de/"
|
c['buildbotURL'] = "https://build.blackfinn.de/"
|
||||||
|
|
||||||
# minimalistic config to activate new web UI
|
# minimalistic config to activate new web UI
|
||||||
c['www'] = dict(port=8010, plugins=dict(waterfall_view={}, console_view={}, grid_view={}))
|
c['www'] = dict(port=8010,
|
||||||
|
plugins=dict(waterfall_view={},
|
||||||
|
console_view={},
|
||||||
|
grid_view={}),
|
||||||
|
change_hook_dialects={'gitlab' : {'secret': 'sbe7KS9m5Kt-1MxsTKLm',},},
|
||||||
|
)
|
||||||
|
|
||||||
####### DB URL
|
####### DB URL
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user