| 1 | p4port = "10.53.40.108:1666" |
|---|
| 2 | p4user = "perforce" |
|---|
| 3 | |
|---|
| 4 | c = BuildmasterConfig = {} |
|---|
| 5 | |
|---|
| 6 | ####### BUILDSLAVES |
|---|
| 7 | from buildbot.buildslave import BuildSlave |
|---|
| 8 | c['slaves'] = [ |
|---|
| 9 | BuildSlave("bs.Ubuntu.8.04.i386", "test") |
|---|
| 10 | ] |
|---|
| 11 | |
|---|
| 12 | c['slavePortnum'] = 10000 |
|---|
| 13 | |
|---|
| 14 | ####### CHANGESOURCES |
|---|
| 15 | from buildbot.changes import p4poller |
|---|
| 16 | c['change_source'] = p4poller.P4Source(p4port=p4port, p4user=p4user, p4base="//test/develop/main/", split_file=lambda branchfile: branchfile.split('/',1), pollinterval=10, ) |
|---|
| 17 | |
|---|
| 18 | ####### SCHEDULERS |
|---|
| 19 | from buildbot.scheduler import Scheduler |
|---|
| 20 | c['schedulers'] = [] |
|---|
| 21 | |
|---|
| 22 | sched_test_full = Scheduler(name="test.ubuntu.full", |
|---|
| 23 | branch=None, |
|---|
| 24 | treeStableTimer=60, |
|---|
| 25 | builderNames=["test.ubuntu.full"]) |
|---|
| 26 | c['schedulers'].append(sched_test_full) |
|---|
| 27 | |
|---|
| 28 | ####### BUILDERS |
|---|
| 29 | from buildbot.process import factory |
|---|
| 30 | from buildbot.steps.source import P4 |
|---|
| 31 | from buildbot.steps.shell import Compile |
|---|
| 32 | from buildbot.steps.shell import ShellCommand |
|---|
| 33 | |
|---|
| 34 | f1 = factory.BuildFactory() |
|---|
| 35 | |
|---|
| 36 | f1.addStep(P4(mode="update", p4base="//test/develop/main/", p4port=p4port, p4user=p4user)) |
|---|
| 37 | |
|---|
| 38 | f1.addStep(ShellCommand(command="autoconf")) |
|---|
| 39 | f1.addStep(ShellCommand(command="./configure")) |
|---|
| 40 | f1.addStep(Compile(command="make")) |
|---|
| 41 | |
|---|
| 42 | b1 = {'name': "test.ubuntu.full", |
|---|
| 43 | 'slavename': "bs.Ubuntu.8.04.i386", |
|---|
| 44 | 'builddir': "test.ubuntu.full", |
|---|
| 45 | 'factory': f1, |
|---|
| 46 | 'env': {'P4CHARSET': 'utf8'} |
|---|
| 47 | } |
|---|
| 48 | c['builders'] = [b1] |
|---|
| 49 | |
|---|
| 50 | |
|---|
| 51 | ####### STATUS TARGETS |
|---|
| 52 | c['status'] = [] |
|---|
| 53 | |
|---|
| 54 | from buildbot.status import html |
|---|
| 55 | c['status'].append(html.WebStatus(20000,allowForce=True)) |
|---|
| 56 | |
|---|
| 57 | c['projectName'] = "test" |
|---|
| 58 | c['projectURL'] = "http://localhost:20000" |
|---|
| 59 | c['buildbotURL'] = "http://localhost:20000/" |
|---|