WIP
This commit is contained in:
parent
0faffa0bbd
commit
27ef507928
4
.gitignore
vendored
4
.gitignore
vendored
@ -1 +1,3 @@
|
|||||||
worker.env
|
db.env
|
||||||
|
.env
|
||||||
|
master.cfg
|
||||||
|
@ -1,21 +1,23 @@
|
|||||||
version: '2'
|
version: '2'
|
||||||
services:
|
services:
|
||||||
buildbot:
|
master:
|
||||||
image: "buildbot/buildbot-master:master"
|
image: "buildbot/buildbot-master:${BUILDBOT_VERSION}"
|
||||||
env_file:
|
env_file:
|
||||||
|
- .env
|
||||||
- db.env
|
- db.env
|
||||||
environment:
|
environment:
|
||||||
- BUILDBOT_CONFIG_DIR=config
|
- BUILDBOT_CONFIG_DIR=config
|
||||||
- BUILDBOT_CONFIG_URL=https://github.com/buildbot/buildbot-docker-example-config/archive/master.tar.gz
|
|
||||||
- BUILDBOT_WORKER_PORT=9989
|
- BUILDBOT_WORKER_PORT=9989
|
||||||
- BUILDBOT_WEB_URL=http://localhost:8010/
|
|
||||||
- BUILDBOT_WEB_PORT=tcp:port=8010
|
- BUILDBOT_WEB_PORT=tcp:port=8010
|
||||||
links:
|
links:
|
||||||
- db
|
- db
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
|
volumes:
|
||||||
|
- "${MASTER_CONFIG_PATH}:/buildbot/:rw"
|
||||||
ports:
|
ports:
|
||||||
- "${MASTER_EXTERNAL_IP}:8010:8010"
|
- "${MASTER_EXTERNAL_IP}:8010:8010"
|
||||||
|
- "${MASTER_EXTERNAL_IP}:9989:9989"
|
||||||
|
|
||||||
db:
|
db:
|
||||||
env_file:
|
env_file:
|
||||||
@ -23,13 +25,14 @@ services:
|
|||||||
image: "postgres:9.4"
|
image: "postgres:9.4"
|
||||||
|
|
||||||
worker:
|
worker:
|
||||||
image: "buildbot/buildbot-worker:master"
|
image: "buildbot/buildbot-worker:${BUILDBOT_VERSION}"
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
environment:
|
environment:
|
||||||
BUILDMASTER: buildbot
|
BUILDMASTER: master
|
||||||
BUILDMASTER_PORT: 9989
|
BUILDMASTER_PORT: 9989
|
||||||
WORKERNAME: worker
|
WORKERNAME: worker
|
||||||
WORKERPASS: pass
|
WORKERPASS: "${WORKER_PASSWORD}"
|
||||||
WORKER_ENVIRONMENT_BLACKLIST: DOCKER_BUILDBOT* BUILDBOT_ENV_* BUILDBOT_1* WORKER_ENVIRONMENT_BLACKLIST
|
WORKER_ENVIRONMENT_BLACKLIST: DOCKER_BUILDBOT* BUILDBOT_ENV_* BUILDBOT_1* WORKER_ENVIRONMENT_BLACKLIST
|
||||||
|
|
||||||
links:
|
links:
|
||||||
- buildbot
|
- master
|
||||||
|
116
master.cfg.dist
Normal file
116
master.cfg.dist
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
# -*- python -*-
|
||||||
|
# ex: set filetype=python:
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
|
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.Worker("example-worker", 'pass')]
|
||||||
|
|
||||||
|
if 'BUILDBOT_MQ_URL' in os.environ:
|
||||||
|
c['mq'] = {
|
||||||
|
'type' : 'wamp',
|
||||||
|
'router_url': os.environ['BUILDBOT_MQ_URL'],
|
||||||
|
'realm': os.environ.get('BUILDBOT_MQ_REALM', 'buildbot').decode('utf-8'),
|
||||||
|
'debug' : 'BUILDBOT_MQ_DEBUG' in os.environ,
|
||||||
|
'debug_websockets' : 'BUILDBOT_MQ_DEBUG' in os.environ,
|
||||||
|
'debug_lowlevel' : 'BUILDBOT_MQ_DEBUG' in os.environ,
|
||||||
|
}
|
||||||
|
# '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': os.environ.get("BUILDBOT_WORKER_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 clone of pyflakes.
|
||||||
|
|
||||||
|
c['change_source'] = []
|
||||||
|
c['change_source'].append(changes.GitPoller(
|
||||||
|
'git://github.com/buildbot/pyflakes.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='http://github.com/buildbot/pyflakes.git', mode='incremental'))
|
||||||
|
# run the tests (note that this will require that 'trial' is installed)
|
||||||
|
factory.addStep(steps.ShellCommand(command=["trial", "pyflakes"]))
|
||||||
|
|
||||||
|
c['builders'] = []
|
||||||
|
c['builders'].append(
|
||||||
|
util.BuilderConfig(name="runtests",
|
||||||
|
workernames=["example-worker"],
|
||||||
|
factory=factory))
|
||||||
|
|
||||||
|
####### REPORTER TARGETS
|
||||||
|
|
||||||
|
# 'services' is a list of Reporter Targets. The results 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'] = "Pyflakes"
|
||||||
|
c['titleURL'] = "https://launchpad.net/pyflakes"
|
||||||
|
|
||||||
|
# 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'] = os.environ.get("BUILDBOT_WEB_URL", "http://localhost:8010/")
|
||||||
|
|
||||||
|
# minimalistic config to activate new web UI
|
||||||
|
c['www'] = dict(port=os.environ.get("BUILDBOT_WEB_PORT", 8010),
|
||||||
|
plugins=dict(waterfall_view={}, console_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' : os.environ.get("BUILDBOT_DB_URL", "sqlite://").format(**os.environ),
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user