Add pipeline for bicycle-statistics.

This commit is contained in:
Thomas Klaehn 2019-08-15 11:43:47 +02:00
parent e0cadc4357
commit 5a13a53be3
2 changed files with 38 additions and 0 deletions

9
.gitignore vendored Normal file
View File

@ -0,0 +1,9 @@
buildbot.tac
core
gitpoller-work/
http.log
master.cfg.sample
state.sqlite
twistd.log*
twistd.pid

View File

@ -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