# -*- python -*- # ex: set filetype=python: from buildbot.plugins import * c = BuildmasterConfig = {} ####### WORKERS c['workers'] = [] c['workers'].append(worker.DockerLatentWorker('buildbot-cpp-worker', 'pass', docker_host='tcp://192.168.178.39:2375', image='buildbot-cpp-worker')) c['workers'].append(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'])) # 'protocols' contains information about protocols which master will use for # communicating with workers. You must define at least 'port' option that workers # could connect to your master with this protocol. # 'port' must match the value configured into the workers (with their # --master option) c['protocols'] = {'pb': {'port': 9989}} ####### CHANGESOURCES c['change_source'] = [] ## test.c c['change_source'].append(changes.GitPoller(project='test.c', repourl='https://git.blackfinn.de/tkl/test.c.git', branches=True, pollInterval=300)) ## gpio_ftdi c['change_source'].append(changes.GitPoller(project='gpio_ftdi', repourl='https://git.blackfinn.de/adc_gpio_i2c/gpio_ftdi.git', branches=True, pollInterval=60)) ## gpio_sys c['change_source'].append(changes.GitPoller(project='gpio_sys', repourl='https://git.blackfinn.de/adc_gpio_i2c/gpio_sys.git', branches=True, pollInterval=60)) ## i2c_bb c['change_source'].append(changes.GitPoller(project='i2c_bb', repourl='https://git.blackfinn.de/adc_gpio_i2c/i2c_bb.git', branches=True, pollInterval=60)) ## ads1115 c['change_source'].append(changes.GitPoller(project='ads1115', repourl='https://git.blackfinn.de/adc_gpio_i2c/ads1115.git', branches=True, pollInterval=60)) ## voltage_app c['change_source'].append(changes.GitPoller(project='voltage_app', repourl='https://git.blackfinn.de/adc_gpio_i2c/voltage_app.git', branches=True, pollInterval=60)) ## bicycle-statistics python c['change_source'].append(changes.GitPoller(project='bicycle-statistics-python', repourl='https://git.blackfinn.de/python/bicycle-statistics.git', branches=True, pollInterval=60)) ## bicycle-statistics docker c['change_source'].append(changes.GitPoller(project='bicycle-statistics-docker', repourl='https://git.blackfinn.de/docker/bicycle-statistics.git', branches=True, pollInterval=60)) ####### SCHEDULERS c['schedulers'] = [] ## test.c c['schedulers'].append(schedulers.SingleBranchScheduler(name="test_c", change_filter=util.ChangeFilter(project='test.c'), treeStableTimer=None, builderNames=["test.c"])) c['schedulers'].append(schedulers.ForceScheduler(name="force_test_c", builderNames=["test.c"])) ## gpio_ftdi c['schedulers'].append(schedulers.SingleBranchScheduler(name="gpio_ftdi", change_filter=util.ChangeFilter(project='gpio_ftdi'), treeStableTimer=None, builderNames=["gpio_ftdi"])) c['schedulers'].append(schedulers.ForceScheduler(name="force_gpio_ftdi", builderNames=["gpio_ftdi"])) ## gpio_sys c['schedulers'].append(schedulers.SingleBranchScheduler(name="gpio_sys", change_filter=util.ChangeFilter(project='gpio_sys'), treeStableTimer=None, builderNames=["gpio_sys"])) c['schedulers'].append(schedulers.ForceScheduler(name="force_gpio_sys", builderNames=["gpio_sys"])) ## i2c_bb c['schedulers'].append(schedulers.SingleBranchScheduler(name="i2c_bb", change_filter=util.ChangeFilter(project='i2c_bb'), treeStableTimer=None, builderNames=["i2c_bb"])) c['schedulers'].append(schedulers.ForceScheduler(name="force_i2c_bb", builderNames=["i2c_bb"])) ## ads1115 c['schedulers'].append(schedulers.SingleBranchScheduler(name="ads1115", change_filter=util.ChangeFilter(project=['i2c_bb', 'ads1115']), treeStableTimer=None, builderNames=["ads1115"])) c['schedulers'].append(schedulers.ForceScheduler(name="force_ads1115", builderNames=["ads1115"])) ## voltage_app c['schedulers'].append(schedulers.SingleBranchScheduler(name="voltage_app", change_filter=util.ChangeFilter(project=['voltage_app', 'ads1115', 'i2c_bb']), treeStableTimer=None, builderNames=["voltage_app"])) c['schedulers'].append(schedulers.ForceScheduler(name="force_voltage_app", builderNames=["voltage_app"])) ## bicycle_statistics c['schedulers'].append(schedulers.SingleBranchScheduler(name="bicycle_statistics", change_filter=util.ChangeFilter(project=['bicycle-statistics-python', 'bicycle-statistics-docker']), treeStableTimer=None, builderNames=["bicycle_statistics"])) c['schedulers'].append(schedulers.ForceScheduler(name="force_bicycle-statistics", builderNames=["bicycle_statistics"])) ####### BUILDERS c['builders'] = [] ## test.c test_c_factory = util.BuildFactory() test_c_factory.addStep(steps.Git(repourl='https://git.blackfinn.de/tkl/test.c.git', mode='full')) test_c_factory.addStep(steps.ShellCommand(command=['make', 'check', '-j8'])) test_c_factory.addStep(steps.Compile(command=['make', 'all', '-j8'])) test_c_factory.addStep(steps.ShellCommand(command=['make', 'build_unit_test', '-j8'])) test_c_factory.addStep(steps.ShellCommand(command=['make', 'exec_unit_test'])) test_c_factory.addStep(steps.ShellCommand(command='make clean && make coverage')) ## gpio_ftdi gpio_ftdi_factory = util.BuildFactory() gpio_ftdi_factory.addStep(steps.Git(repourl='https://git.blackfinn.de/adc_gpio_i2c/gpio_ftdi.git', mode='full')) gpio_ftdi_factory.addStep(steps.ShellCommand(command=['make', 'check', '-j8'])) gpio_ftdi_factory.addStep(steps.Compile(command=['make', 'all', '-j8'])) gpio_ftdi_factory.addStep(steps.ShellCommand(command=['make', 'build_unit_test', '-j8'])) gpio_ftdi_factory.addStep(steps.ShellCommand(command=['make', 'exec_unit_test'])) gpio_ftdi_factory.addStep(steps.ShellCommand(command='make clean && make coverage')) ## gpio_sys gpio_sys_factory = util.BuildFactory() gpio_sys_factory.addStep(steps.Git(repourl='https://git.blackfinn.de/adc_gpio_i2c/gpio_sys.git', mode='full')) gpio_sys_factory.addStep(steps.ShellCommand(command=['make', 'check', '-j8'])) gpio_sys_factory.addStep(steps.Compile(command=['make', 'all', '-j8'])) gpio_sys_factory.addStep(steps.ShellCommand(command=['make', 'build_unit_test', '-j8'])) gpio_sys_factory.addStep(steps.ShellCommand(command=['make', 'exec_unit_test'])) gpio_sys_factory.addStep(steps.ShellCommand(command='make clean && make coverage')) ## i2c_bb i2c_bb_factory = util.BuildFactory() # DUT i2c_bb_factory.addStep(steps.ShellCommand(command=['git', 'clone', '--branch', 'master', 'https://git.blackfinn.de/adc_gpio_i2c/i2c_bb.git'])) i2c_bb_factory.addStep(steps.ShellCommand(command=['make', '-C', 'i2c_bb', 'check', '-j8'])) i2c_bb_factory.addStep(steps.ShellCommand(command=['make', '-C', 'i2c_bb', 'all', '-j8', 'EXTRA_INC=/worker/include'])) i2c_bb_factory.addStep(steps.ShellCommand(command=['make', '-C', 'i2c_bb', 'exec_unit_test', '-j8', 'EXTRA_INC=/worker/include'])) i2c_bb_factory.addStep(steps.ShellCommand(command='make -C i2c_bb clean && make -C i2c_bb coverage -j8 EXTRA_INC=/worker/include')) ## ads1115 ads1115_factory = util.BuildFactory() # install dependencies ads1115_factory.addStep(steps.ShellCommand(command=['git', 'clone', '--branch', 'master', 'https://git.blackfinn.de/adc_gpio_i2c/i2c_bb.git'])) ads1115_factory.addStep(steps.ShellCommand(command=['make', '-C', 'i2c_bb', 'install', '-j8', 'PREFIX=/worker'])) # DUT ads1115_factory.addStep(steps.ShellCommand(command=['git', 'clone', '--branch', 'master', 'https://git.blackfinn.de/adc_gpio_i2c/ads1115.git'])) ads1115_factory.addStep(steps.ShellCommand(command=['make', '-C', 'ads1115', 'check', '-j8'])) ads1115_factory.addStep(steps.ShellCommand(command=['make', '-C', 'ads1115', 'all', '-j8', 'EXTRA_INC=/worker/include'])) ads1115_factory.addStep(steps.ShellCommand(command=['make', '-C', 'ads1115', 'exec_unit_test', '-j8', 'EXTRA_INC=/worker/include'])) ads1115_factory.addStep(steps.ShellCommand(command='make -C ads1115 clean && make -C ads1115 coverage -j8 EXTRA_INC=/worker/include')) ## voltage_app voltage_app_factory = util.BuildFactory() # install dependencies voltage_app_factory.addStep(steps.ShellCommand(command=['git', 'clone', '--branch', 'master', 'https://git.blackfinn.de/adc_gpio_i2c/i2c_bb.git'])) voltage_app_factory.addStep(steps.ShellCommand(command=['make', '-C', 'i2c_bb', 'install', '-j8', 'PREFIX=/worker'])) voltage_app_factory.addStep(steps.ShellCommand(command=['git', 'clone', '--branch', 'master', 'https://git.blackfinn.de/adc_gpio_i2c/ads1115.git'])) voltage_app_factory.addStep(steps.ShellCommand(command=['make', '-C', 'ads1115', 'install', '-j8', 'PREFIX=/worker'])) # DUT voltage_app_factory.addStep(steps.ShellCommand(command=['git', 'clone', '--branch', 'master', 'https://git.blackfinn.de/adc_gpio_i2c/voltage_app.git'])) voltage_app_factory.addStep(steps.ShellCommand(command=['make', '-C', 'voltage_app', 'check', '-j8'])) voltage_app_factory.addStep(steps.ShellCommand(command=['make', '-C', 'voltage_app', 'all', '-j8', 'EXTRA_INC=/worker/include', 'EXTRA_LIB_DIR=/worker/lib'])) #voltage_app_factory.addStep(steps.ShellCommand(command=['make', '-C', 'voltage_app', 'build_unit_test', '-j8'])) #voltage_app_factory.addStep(steps.ShellCommand(command=['make', '-C', 'voltage_app', 'exec_unit_test'])) #voltage_app_factory.addStep(steps.ShellCommand(command='make -C voltage_app clean && make -C voltage_app coverage')) ## bicycle-statistics bicycle_statistics_factory = util.BuildFactory() bicycle_statistics_factory.addStep(steps.ShellCommand(command=['git', 'clone', '--branch', 'master', 'https://git.blackfinn.de/docker/bicycle-statistics.git'])) bicycle_statistics_factory.addStep(steps.ShellCommand(command=['docker', 'build', '--no-cache', '-t', 'bicycle-statistics', './bicycle-statistics'])) bicycle_statistics_factory.addStep(steps.ShellCommand(command=['docker', 'rm', '-f', 'bicycle-statistics'])) 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'])) c['builders'].append(util.BuilderConfig(name="test.c", workernames=["buildbot-cpp-worker"], factory=test_c_factory)) c['builders'].append(util.BuilderConfig(name="gpio_ftdi", workernames=["buildbot-cpp-worker"], factory=gpio_ftdi_factory)) c['builders'].append(util.BuilderConfig(name="gpio_sys", workernames=["buildbot-cpp-worker"], factory=gpio_sys_factory)) c['builders'].append(util.BuilderConfig(name="i2c_bb", workernames=["buildbot-cpp-worker"], factory=i2c_bb_factory)) c['builders'].append(util.BuilderConfig(name="ads1115", workernames=["buildbot-cpp-worker"], factory=ads1115_factory)) c['builders'].append(util.BuilderConfig(name="voltage_app", workernames=["buildbot-cpp-worker"], factory=voltage_app_factory)) c['builders'].append(util.BuilderConfig(name="bicycle_statistics", workernames=["buildbot-docker-worker"], factory=bicycle_statistics_factory)) ####### BUILDBOT SERVICES # 'services' is a list of BuildbotService items like reporter targets. The # status of each build will be pushed to these targets. buildbot/reporters/*.py # has a variety to choose from, like IRC bots. c['services'] = [] ####### PROJECT IDENTITY # the 'title' string will appear at the top of this buildbot installation's # home pages (linked to the 'titleURL'). c['title'] = "blackfinn CI" c['titleURL'] = "https://build.blackfinn.de/" # the 'buildbotURL' string should point to the location where the buildbot's # internal web server is visible. This typically uses the port number set in # the 'www' entry below, but with an externally-visible host name which the # buildbot cannot figure out without some help. c['buildbotURL'] = "https://build.blackfinn.de/" # minimalistic config to activate new web UI c['www'] = dict(port=8010, plugins=dict(waterfall_view={}, console_view={}, grid_view={})) ####### DB URL c['db'] = { # This specifies what database buildbot uses to store its state. You can leave # this at its default for all but the largest installations. 'db_url' : "sqlite:///state.sqlite", } c['buildbotNetUsageData'] = None