buildbot调度程序不起作用

时间:2012-07-31 06:28:16

标签: scheduler buildbot

我预计buildbot会在检测到新版本提交给svn时触发构建器,但它失败了。只有添加了Periodic调度程序才能触发构建器,但这不是我的期望。根据日志,

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
检测到

新提交,但未触发构建器。

以下是我的配置文件:

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 个答案:

答案 0 :(得分:0)

如果SVNPoller工作正常,您应该看到类似

的行
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

我的猜测是那里列出的分支与Scheduler指定的分支不同,因此它不会被触发。