Buildbot 0.8.8
轮询器的配置:
c['change_source'].append(GitPoller(
repourl='git@git:chip_b',
branches=['master','A7.0.0'],
project='chip-b',
pollinterval=100))
c['change_source'].append(GitPoller(
repourl='git@git:chip_c',
branches=['master','A7.0.0'],
project='chip-b',
pollinterval=100))
我希望这段代码每隔100秒轮询两个存储库,两个分支,并使用调度程序运行一些代码:
c['schedulers'].append(SingleBranchScheduler(
name="sanity_chip-b",
change_filter=filter.ChangeFilter(project=['chip-b'], branch='master'),
treeStableTimer=300,
fileIsImportant=imp_files_for_sanity,
builderNames=["runsanity-top"]))
但是我收到了这个错误:
2014-09-17 18:41:19-0700 [-] /home/buildbot/buildbot/local/lib/python2.7/site-packages/twisted/internet/utils.py:25: exceptions.DeprecationWarning: Argument strings and environment keys/values passed to reactor.spawnProcess should be str, not unicode.
2014-09-17 18:41:19-0700 [-] gitpoller: processing 0 changes: [] from "git@git:chip_c"
没有检测到变化。但是,我知道已经做了更改。
轮询器代码是否正确?我们刚刚从0.8.6升级到0.8.8,因此可能会有一些升级更改。 轮询器是否可以将两个分支的轮询分配到同一个工作目录中?
非常感谢。
答案 0 :(得分:1)
调度程序仅查看主分支中的更改。除了为两个GitPoller使用单独的调度程序之外,请尝试以下方法:
def sanity_branch_fn(branch):
return branch in ['master','A7.0.0']
c['schedulers'].append(SingleBranchScheduler(
name="sanity_chip-b",
change_filter=filter.ChangeFilter(project=['chip-b'], branch_fn=sanity_branch_fn),
treeStableTimer=300,
fileIsImportant=imp_files_for_sanity,
builderNames=["runsanity-top"]))