[Buildbot-devel] perforce connection

William Deegan bill at baddogconsulting.com
Sun Aug 19 03:11:11 UTC 2012


Andrea,


On Aug 18, 2012, at 3:42 AM, Andrea Crotti <andrea.crotti.0 at gmail.com> wrote:

> I'll paste it on Monday, but I checked and (both slave and master) didn't contain any errors.

Not looking for errors, just looking for status logs.
It's likely seeing changes, bug discarding them because your scheduler isn't configured to build changes from your actual branches.

> 
> Yes in the actual path there are checkins, but where does master comes from?
> There is no master branch in general, but DEV and MAIN in general..

I comes from this part of your config.

>> c['schedulers'].append(SingleBranchScheduler(
>>    name="all",
>>    change_filter=filter.ChangeFilter(branch='master'),
>>    treeStableTimer=None,
>>    builderNames=["runtests"]))

What's the depot path to the branches you want to build?


> 
> But anyway, shouldn't there be some warnings/error somewhere if it's not able to checkout
> anything useful from the revision control system?

No. How would buildbot know if there are no checkins or not.

> 
> And how can I possibly reach them?

I don't understand this question, can you rephrase?

> And last thing, how come the log is twisted.log, I understand that twisted is heavily used but could
> not be buildbot/slave.log instead?

Buildbot sits on top of twisted. Twisted does the logging.
It's probably unlikely to change at this point as it's been that way for so long.
(Comments anyone else?)

-Bill

> 
> Thanks,
> Andrea
> 
> 
> On 08/17/2012 07:58 PM, William Deegan wrote:
>> Andrea,
>> 
>> Can you paste your twisted.log?
>> 
>> Do you have checkins in //base/master/...
>> 
>> -Bill
>> On Aug 17, 2012, at 8:37 AM, andrea crotti <andrea.crotti.0 at gmail.com> wrote:
>> 
>>> So well the client thing is now not an issue, I'm just trying to run
>>> everything on on my local machine and see what happens..
>>> 
>>> Here below is the full master configuration.
>>> The problem is that I don't get any sort of errors and in the web
>>> interface the client is connected, but there are no builds available
>>> to it.
>>> 
>>> So I think is just something stupid missing from here, but can't see what..
>>> 
>>> (I'm not even sure is actually trying to checkout things from perforce..)
>>> I tried the manhole thing and it's nice, but just more verbose logging
>>> would be better possibly, anywyay to see more in detail what buildbot
>>> is running?
>>> 
>>> c = BuildmasterConfig = {}
>>> 
>>> SLAVES = ["linux_arch"]
>>> 
>>> from buildbot.buildslave import BuildSlave
>>> c['slaves'] = [BuildSlave(x, x) for x in SLAVES]
>>> 
>>> c['slavePortnum'] = 9989
>>> 
>>> 
>>> c['change_source'] = []
>>> 
>>> P4_ANDREA = {
>>>    'p4base': '//base',
>>>    'p4port': 'port:1666',
>>>    'p4user': 'user',
>>>    'p4passwd': 'pass',
>>> }
>>> 
>>> ANDREA_WS = 'workspace'
>>> 
>>> from buildbot.changes.p4poller import P4Source
>>> s = P4Source(**P4_ANDREA)
>>> 
>>> c['change_source'].append(s)
>>> 
>>> 
>>> from buildbot.schedulers.basic import SingleBranchScheduler
>>> from buildbot.schedulers.forcesched import ForceScheduler
>>> from buildbot.changes import filter
>>> 
>>> c['schedulers'] = []
>>> c['schedulers'].append(SingleBranchScheduler(
>>>    name="all",
>>>    change_filter=filter.ChangeFilter(branch='master'),
>>>    treeStableTimer=None,
>>>    builderNames=["runtests"]))
>>> 
>>> c['schedulers'].append(ForceScheduler(
>>>    name="force",
>>>    builderNames=["runtests"]))
>>> 
>>> 
>>> from buildbot.process.factory import BuildFactory
>>> from buildbot.steps.shell import ShellCommand
>>> 
>>> factory = BuildFactory()
>>> 
>>> from buildbot.steps.source import P4
>>> from buildbot.steps.shell import ShellCommand
>>> 
>>> factory.addStep(P4(p4client=ANDREA_WS, **P4_ANDREA))
>>> factory.addStep(ShellCommand(command=["nosetests-2.7"]))
>>> 
>>> from buildbot.config import BuilderConfig
>>> 
>>> c['builders'] = []
>>> 
>>> run_tests = BuilderConfig(name="runtests",
>>>                          slavenames=SLAVES,
>>>                          factory=factory)
>>> 
>>> c['builders'].append(run_tests)
>>> 
>>> 
>>> 
>>> c['status'] = []
>>> 
>>> from buildbot.status import html
>>> from buildbot.status.web import authz, auth
>>> 
>>> authz_cfg=authz.Authz(
>>>    # change any of these to True to enable; see the manual for more
>>>    # options
>>>    auth=auth.BasicAuth([("pytest","pytest")]),
>>>    gracefulShutdown = False,
>>>    forceBuild = 'auth', # use this to test your slave once it is set up
>>>    forceAllBuilds = False,
>>>    pingBuilder = False,
>>>    stopBuild = False,
>>>    stopAllBuilds = False,
>>>    cancelPendingBuild = False,
>>> )
>>> c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg))
>>> 
>>> 
>>> c['title'] = "Pytest"
>>> 
>>> 
>>> c['buildbotURL'] = "http://localhost:8010/"
>>> 
>>> 
>>> 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",
>>> }
> 





More information about the devel mailing list