Last active
August 29, 2015 14:14
-
-
Save emoon/d39082b9e3b451454828 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Steps to repro: | |
--------------- | |
1. buildbot create-master temp-master | |
2. mv temp-master/temp-master.cfg.sample temp-master/master.cfg | |
3. Change so it looks like this (MailNotifier added) | |
--------------- | |
# -*- python -*- | |
# ex: set syntax=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 = {} | |
####### BUILDSLAVES | |
# The 'slaves' list defines the set of recognized buildslaves. Each element is | |
# a BuildSlave object, specifying a unique slave name and password. The same | |
# slave name and password must be configured on the slave. | |
c['slaves'] = [buildslave.BuildSlave("example-slave", "pass")] | |
# 'protocols' contains information about protocols which master will use for | |
# communicating with slaves. | |
# You must define at least 'port' option that slaves could connect to your master | |
# with this protocol. | |
# 'port' must match the value configured into the buildslaves (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 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 slaves can execute them. Note that any particular build will | |
# only take place on one slave. | |
factory = util.BuildFactory() | |
# check out the source | |
factory.addStep(steps.Git(repourl='git://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", | |
slavenames=["example-slave"], | |
factory=factory)) | |
####### STATUS TARGETS | |
# 'status' is a list of Status Targets. The results of each build will be | |
# pushed to these targets. buildbot/status/*.py has a variety to choose from, | |
# including web pages, email senders, and IRC bots. | |
from buildbot.plugins import status | |
m = status.MailNotifier(fromaddr="buildbot@localhost", extraRecipients=["[email protected]"], sendToInterestedUsers=False) | |
c['status'] = [] | |
c['status'].append(m) | |
####### PROJECT IDENTITY | |
# the 'title' string will appear at the top of this buildbot | |
# installation's html.WebStatus home page (linked to the | |
# 'titleURL') and is embedded in the title of the waterfall HTML page. | |
c['title'] = "Pyflakes" | |
c['titleURL'] = "https://launchpad.net/pyflakes" | |
# the 'buildbotURL' string should point to the location where the buildbot's | |
# internal web server (usually the html.WebStatus page) is visible. This | |
# typically uses the port number set in the Waterfall 'status' entry, but | |
# with an externally-visible host name which the buildbot cannot figure out | |
# without some help. | |
c['buildbotURL'] = "http://localhost:8020/" | |
# minimalistic config to activate new web UI | |
c['www'] = dict(port=8020, | |
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' : "sqlite:///state.sqlite", | |
} | |
-------------------- | |
4. buildbot start temp-master | |
-------------------- | |
Following twistd.log until startup finished.. | |
2015-02-05 08:09:16+0100 [-] Log opened. | |
2015-02-05 08:09:16+0100 [-] twistd 13.2.0 (/usr/bin/python 2.7.6) starting up. | |
2015-02-05 08:09:16+0100 [-] reactor class: twisted.internet.selectreactor.SelectReactor. | |
2015-02-05 08:09:16+0100 [-] Starting BuildMaster -- buildbot.version: 0.9.0 | |
2015-02-05 08:09:16+0100 [-] Loading configuration from '/Users/emoon/code/temp-master/master.cfg' | |
2015-02-05 08:09:16+0100 [-] Setting up database with URL 'sqlite:/state.sqlite' | |
2015-02-05 08:09:16+0100 [-] setting database journal mode to 'wal' | |
2015-02-05 08:09:16+0100 [-] adding 1 new changesources, removing 0 | |
2015-02-05 08:09:16+0100 [-] adding 1 new builders, removing 0 | |
2015-02-05 08:09:16+0100 [-] gitpoller: using workdir '/Users/emoon/code/temp-master/gitpoller-workdir' | |
2015-02-05 08:09:16+0100 [-] trying to load status pickle from /Users/emoon/code/temp-master/runtests/builder | |
2015-02-05 08:09:16+0100 [-] added builder runtests with tags [] | |
2015-02-05 08:09:16+0100 [-] adding scheduler 'all' | |
2015-02-05 08:09:16+0100 [-] adding scheduler 'force' | |
2015-02-05 08:09:16+0100 [-] initializing www plugin 'waterfall_view' | |
2015-02-05 08:09:16+0100 [-] initializing www plugin 'console_view' | |
2015-02-05 08:09:16+0100 [-] RotateLogSite starting on 8020 | |
2015-02-05 08:09:16+0100 [-] Starting factory <buildbot.www.service.RotateLogSite instance at 0x102712560> | |
2015-02-05 08:09:16+0100 [-] Setting up http.log rotating 10 files of 10000000 bytes each | |
2015-02-05 08:09:16+0100 [-] while starting BuildMaster | |
Traceback (most recent call last): | |
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twisted/internet/defer.py", line 1155, in gotResult | |
_inlineCallbacks(r, g, deferred) | |
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twisted/internet/defer.py", line 1099, in _inlineCallbacks | |
result = g.send(result) | |
File "/Library/Python/2.7/site-packages/buildbot-0.9.0-py2.7.egg/buildbot/util/service.py", line 43, in reconfigServiceWithBuildbotConfig | |
yield svc.reconfigServiceWithBuildbotConfig(new_config) | |
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twisted/internet/defer.py", line 1237, in unwindGenerator | |
return _inlineCallbacks(None, gen, Deferred()) | |
--- <exception caught here> --- | |
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twisted/internet/defer.py", line 1099, in _inlineCallbacks | |
result = g.send(result) | |
File "/Library/Python/2.7/site-packages/buildbot-0.9.0-py2.7.egg/buildbot/status/master.py", line 92, in reconfigServiceWithBuildbotConfig | |
yield sr.setServiceParent(self) | |
File "/Library/Python/2.7/site-packages/buildbot-0.9.0-py2.7.egg/buildbot/status/mail.py", line 469, in setServiceParent | |
self.master_status.subscribe(self) | |
exceptions.AttributeError: 'NoneType' object has no attribute 'subscribe' | |
2015-02-05 08:09:16+0100 [-] BuildMaster is running | |
The buildmaster appears to have (re)started correctly. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment