From 5a13a53be38c29abdad429c948cf1a9ca84e8f2f Mon Sep 17 00:00:00 2001 From: Thomas Klaehn Date: Thu, 15 Aug 2019 11:43:47 +0200 Subject: [PATCH] Add pipeline for bicycle-statistics. --- .gitignore | 9 +++++++++ master.cfg | 29 +++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..908440b --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +buildbot.tac +core +gitpoller-work/ +http.log +master.cfg.sample +state.sqlite +twistd.log* +twistd.pid + diff --git a/master.cfg b/master.cfg index c09e608..f75bd53 100644 --- a/master.cfg +++ b/master.cfg @@ -10,6 +10,10 @@ 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 @@ -49,6 +53,16 @@ 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'] = [] @@ -88,6 +102,12 @@ c['schedulers'].append(schedulers.SingleBranchScheduler(name="voltage_app", 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'] = [] @@ -155,6 +175,13 @@ voltage_app_factory.addStep(steps.ShellCommand(command=['make', '-C', 'voltage_a #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"], @@ -167,6 +194,8 @@ c['builders'].append(util.BuilderConfig(name="ads1115", workernames=["buildbot-c 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