buildbot scheduler not work

本小妞迷上赌 提交于 2019-12-25 05:27:07

问题


I expected the buildbot trigger the builder when it detected a new revision had been commited to svn, but it failed. Only when the Periodic scheduler is added can the builder be triggered, but it's not my expectation. According to the log,

2012-07-30 23:51:33-0400 [-] SVNPoller: polling
2012-07-30 23:51:33-0400 [-] SVNPoller: _process_changes 11 .. 12
2012-07-30 23:51:33-0400 [-] Adding change revision 12
2012-07-30 23:51:34-0400 [-] SVNPoller: finished polling None

new commit is detected, but builder is not triggered.

Following is my configure file:

c = BuildmasterConfig = {}
from buildbot.buildslave import BuildSlave
c['slaves'] = [BuildSlave("example-slave", "pass")]

c['slavePortnum'] = 9989

INTERVAL = 30

from buildbot.changes.svnpoller import SVNPoller, split_file_branches
svn_url = 'file:///data/subREPOS/project'
c['change_source'] = []
c['change_source'].append(SVNPoller(svnurl = svn_url,
                                    split_file=split_file_branches,    pollinterval=INTERVAL))

from buildbot.schedulers.basic import Scheduler
from buildbot.scheduler import Periodic

c['schedulers'] = []
c['schedulers'].append(Scheduler(name="General", branch=None,
                                 treeStableTimer=3,
                                 builderNames=["testbuilder"]))
c['schedulers'].append(Periodic("Periodic", ['testbuilder', ], INTERVAL))

from buildbot.process.factory import BuildFactory
from buildbot.steps.source import SVN
from buildbot.steps.shell import ShellCommand, Compile

factory = BuildFactory()

factory.addStep(ShellCommand(command=["ls"]))
factory.addStep(SVN(svn_url, None, 'incremental',workdir='sourcedir' ))
factory.addStep(Compile(workdir="sourcedir", command=["make"]))

from buildbot.config import BuilderConfig

c['builders'] = []
c['builders'].append(
    BuilderConfig(name="testbuilder",
      slavenames=["example-slave"],
      factory=factory))

回答1:


If the SVNPoller is working properly, you should see a line like

added change Change(revision=u'08b4489c26aafc0600bb6cda647c47dc422a6839', who=u'Jaka Kranjc <lynxlupodian@users.sourceforge.net>', branch=u'master', comments=u'fix msvc build error - no strcasecmp', when=1346362922, category=None, project=u'gemrb', repository=u'git://gemrb.git.sourceforge.net/gitroot/gemrb/gemrb', codebase=u'') to database

My guess is that the branch listed there is different than the one specified by Scheduler, hence it isn't getting triggered.



来源:https://stackoverflow.com/questions/11734352/buildbot-scheduler-not-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!