#! /usr/bin/python

from buildbot.plugins import *

BuildmasterConfig = c = {}

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

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

c['builders'] = []

if True:
    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 = 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 = 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"
c['titleURL'] = "http://www.hello.example.com/"
c['buildbotURL'] = "http://localhost:8080"

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

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

# vim:ft=python
