【问题标题】:Buildbot GitPoller doesn't see changesBuildbot GitPoller 没有看到变化
【发布时间】:2014-09-18 01:50:46
【问题描述】:

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,所以可能会有一些升级变化。 轮询器可以将两个分支轮询到同一个工作目录吗?

非常感谢。

【问题讨论】:

  • 在 buildbot trac 2464 上有一张票。尝试在服务器上运行git update-server-info(按照票证中的建议)或等待下一个版本!
  • @sk11,这与发布者看到的错误不同。而且“错误”实际上并不是错误——它是一个弃用警告。不同的 GitPollers 应该使用不同的目录;如果他们共享的目录可以解释您所看到的内容。

标签: git buildbot


【解决方案1】:

调度器只看到主分支中的变化。除了为两个 GitPollers 使用单独的调度器之外,试试这个:

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"]))

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-10-23
    • 2021-08-16
    • 2018-02-17
    相关资源
    最近更新 更多