Преглед на файлове

running configuration

covid-videoplattform
Markus Katharina Brechtel преди 4 години
родител
ревизия
5f788b10ef
променени са 4 файла, в които са добавени 131 реда и са изтрити 1 реда
  1. +1
    -1
      files/systemd/buildbot@.service
  2. +9
    -0
      handlers/main.yaml
  3. +14
    -0
      tasks/main.yaml
  4. +107
    -0
      templates/buildbot/master.cfg.j2

+ 1
- 1
files/systemd/buildbot@.service Целия файл

@@ -12,7 +12,7 @@ After=network.target
User=buildbot
Group=buildbot
WorkingDirectory=/var/lib/buildbot
ExecStart=/usr/bin/buildbot --verbose start --nodaemon %I
ExecStart=/usr/local/bin/buildbot --verbose start --nodaemon %I
ExecReload=/bin/kill -HUP $MAINPID
Restart=always
ProtectSystem=full


+ 9
- 0
handlers/main.yaml Целия файл

@@ -1 +1,10 @@
---

- name: systemd daemon reload
systemd:
daemon_reload: yes

- name: reload buildbot service
systemd:
state: reloaded
name: buildbot@master.service

+ 14
- 0
tasks/main.yaml Целия файл

@@ -49,6 +49,7 @@
copy:
src: systemd/buildbot@.service
dest: /etc/systemd/system/buildbot@.service
notify: systemd daemon reload

- import_tasks: database.yaml

@@ -59,3 +60,16 @@
args:
chdir: /var/lib/buildbot
creates: /var/lib/buildbot/master

- name: buildbot master config file
template:
src: buildbot/master.cfg.j2
dest: /var/lib/buildbot/master/master.cfg
notify: reload buildbot service

- meta: flush_handlers

- name: ensure buildbot service is running
systemd:
state: started
name: buildbot@master.service

+ 107
- 0
templates/buildbot/master.cfg.j2 Целия файл

@@ -0,0 +1,107 @@
# -*- python -*-
# ex: set filetype=python:

from buildbot.plugins import *

# This is a sample buildmaster config file. It must be installed as
# 'master.cfg' in your buildmaster's base directory.

# This is the dictionary that the buildmaster pays attention to. We also use
# a shorter alias to save typing.
c = BuildmasterConfig = {}

####### WORKERS

# The 'workers' list defines the set of recognized workers. Each element is
# a Worker object, specifying a unique worker name and password. The same
# worker name and password must be configured on the worker.
c['workers'] = [worker.LocalWorker("example-worker")]

# '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

# the 'change_source' setting tells the buildmaster how it should find out
# about source code changes. Here we point to the buildbot version of a python hello-world project.

c['change_source'] = []
c['change_source'].append(changes.GitPoller(
'git://github.com/buildbot/hello-world.git',
workdir='gitpoller-workdir', branch='master',
pollInterval=300))

####### SCHEDULERS

# Configure the Schedulers, which decide how to react to incoming changes. In this
# case, just kick off a 'runtests' build

c['schedulers'] = []
c['schedulers'].append(schedulers.SingleBranchScheduler(
name="all",
change_filter=util.ChangeFilter(branch='master'),
treeStableTimer=None,
builderNames=["runtests"]))
c['schedulers'].append(schedulers.ForceScheduler(
name="force",
builderNames=["runtests"]))

####### BUILDERS

# The 'builders' list defines the Builders, which tell Buildbot how to perform a build:
# what steps, and which workers can execute them. Note that any particular build will
# only take place on one worker.

factory = util.BuildFactory()
# check out the source
factory.addStep(steps.Git(repourl='git://github.com/buildbot/hello-world.git', mode='incremental'))
# run the tests (note that this will require that 'trial' is installed)
factory.addStep(steps.ShellCommand(command=["trial", "hello"],
env={"PYTHONPATH": "."}))

c['builders'] = []
c['builders'].append(
util.BuilderConfig(name="runtests",
workernames=["example-worker"],
factory=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'] = "Hello World CI"
c['titleURL'] = "https://buildbot.github.io/hello-world/"

# 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'] = "http://localhost:8010/"

# 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.
# It's easy to start with sqlite, but it's recommended to switch to a dedicated
# database, such as PostgreSQL or MySQL, for use in production environments.
# http://docs.buildbot.net/current/manual/configuration/global.html#database-specification
'db_url' : "{{buildbot_database_url}}",
}

Loading…
Отказ
Запис