Skip to content

Commit

Permalink
final updates of documentation and examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikhail Sobolev committed Jan 13, 2015
1 parent d8a14d0 commit cf5d5e8
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 52 deletions.
99 changes: 50 additions & 49 deletions master/docs/examples/hello.cfg
@@ -1,64 +1,63 @@
#! /usr/bin/python

from buildbot import master
from buildbot.buildslave import BuildSlave
from buildbot.process import factory
from buildbot.steps.source import CVS, SVN, Darcs
from buildbot.steps.shell import Configure, Compile, Test
from buildbot.status import html, client
from buildbot.changes.pb import PBChangeSource
from buildbot.plugins import *

BuildmasterConfig = c = {}

c['slaves'] = [BuildSlave("bot1", "sekrit")]
c['slaves'] = [
BuildSlave("bot1", "sekrit")
]

c['change_source'] = changes.PBChangeSource(prefix="trunk")

c['change_source'] = PBChangeSource(prefix="trunk")
c['builders'] = []

if True:
f = factory.BuildFactory()
f.addStep(CVS(cvsroot="/usr/home/warner/stuff/Projects/BuildBot/demo/Repository",
cvsmodule="hello",
mode="clobber",
checkoutDelay=6,
alwaysUseLatest=True,
))
f.addStep(Configure())
f.addStep(Compile())
f.addStep(Test(command=["make", "check"]))
b1 = {"name": "cvs-hello",
"slavename": "bot1",
"builddir": "cvs-hello",
"factory": f,
}
f = util.BuildFactory()
f.addStep(steps.CVS(cvsroot="/usr/home/warner/stuff/Projects/BuildBot/demo/Repository",
cvsmodule="hello",
mode="clobber",
checkoutDelay=6,
alwaysUseLatest=True))
f.addStep(steps.Configure())
f.addStep(steps.Compile())
f.addStep(steps.Test(command=["make", "check"]))
b1 = {
"name": "cvs-hello",
"slavename": "bot1",
"builddir": "cvs-hello",
"factory": f
}
c['builders'].append(b1)

if True:
svnrep="file:///usr/home/warner/stuff/Projects/BuildBot/demo/SVN-Repository"
f = factory.BuildFactory()
f.addStep(SVN(svnurl=svnrep+"/hello", mode="update"))
f.addStep(Configure())
f.addStep(Compile()),
f.addStep(Test(command=["make", "check"]))
b1 = {"name": "svn-hello",
"slavename": "bot1",
"builddir": "svn-hello",
"factory": f,
}
f = util.BuildFactory()
f.addStep(steps.SVN(svnurl=svnrep+"/hello", mode="update"))
f.addStep(steps.Configure())
f.addStep(steps.Compile()),
f.addStep(steps.Test(command=["make", "check"]))
b1 = {
"name": "svn-hello",
"slavename": "bot1",
"builddir": "svn-hello",
"factory": f
}
c['builders'].append(b1)

if True:
f = factory.BuildFactory()
f.addStep(Darcs(repourl="http://localhost/~warner/hello-darcs",
mode="copy"))
f.addStep(Configure(command=["/bin/sh", "./configure"]))
f.addStep(Compile())
f.addStep(Test(command=["make", "check"]))
b1 = {"name": "darcs-hello",
"slavename": "bot1",
"builddir": "darcs-hello",
"factory": f,
}
f = util.BuildFactory()
f.addStep(steps.Darcs(repourl="http://localhost/~warner/hello-darcs",
mode="copy"))
f.addStep(steps.Configure(command=["/bin/sh", "./configure"]))
f.addStep(steps.Compile())
f.addStep(steps.Test(command=["make", "check"]))
b1 = {
"name": "darcs-hello",
"slavename": "bot1",
"builddir": "darcs-hello",
"factory": f
}
c['builders'].append(b1)

c['title'] = "Hello"
Expand All @@ -67,9 +66,11 @@ c['buildbotURL'] = "http://localhost:8080"

c['slavePortnum'] = 8007
c['debugPassword'] = "asdf"
c['manhole'] = master.Manhole(9900, "username", "password")
c['manhole'] = util.PasswordManhole(9900, "username", "password")

c['status'] = [html.WebStatus(http_port=8080),
client.PBListener(port=8008),
]
c['status'] = [
status.WebStatus(http_port=8080),
status.PBListener(port=8008)
]

# vim:ft=python
2 changes: 1 addition & 1 deletion master/docs/examples/repo_gerrit.cfg
Expand Up @@ -35,7 +35,7 @@ c['slavePortnum'] = 9989

## CHANGESOURCES

c['change_source'] = change_source.GerritChangeSource(gerrit_server, gerrit_user)
c['change_source'] = changes.GerritChangeSource(gerrit_server, gerrit_user)


## SCHEDULERS
Expand Down
6 changes: 4 additions & 2 deletions master/docs/manual/cfg-changesources.rst
Expand Up @@ -92,13 +92,15 @@ The :bb:cfg:`change_source` configuration key holds all active change sources fo

Most configurations have a single :class:`ChangeSource`, watching only a single tree, e.g.::

c['change_source'] = PBChangeSource()
from buildbot.plugins import changes

c['change_source'] = changes.PBChangeSource()

For more advanced configurations, the parameter can be a list of change sources::

source1 = ...
source2 = ...
c['change_source'] = [ source1, source1 ]
c['change_source'] = [source1, source1]

Repository and Project
++++++++++++++++++++++
Expand Down

0 comments on commit cf5d5e8

Please sign in to comment.