2

我有多个 git 存储库,它们之间有一些相互依赖关系。在进行完整的系统构建时,我需要检查所有这些。
使用 buildbot,我可以使用mode='clobber'Git 源类构造函数的参数,但这会导致每次都检出所有存储库:

factory.addStep(Git(repourl='ssh://build@build/repo1', mode='clobber', workdir='build/repo1'))
factory.addStep(Git(repourl='ssh://build@build/repo2', mode='clobber', workdir='build/repo2'))
factory.addStep(Git(repourl='ssh://build@build/repo3', mode='clobber', workdir='build/repo3'))

我想使用mode='copy',但是当我这样做时,所有三个存储库的源都会在同一位置签出,例如。.../source/而不是.../source/repo1 .../source/repo2 .../source/repo3

有没有办法指示 buildbot 分别保留每个存储库的干净副本?

提前致谢!

4

2 回答 2

1

source/您应该考虑使用将由 buildbot签出的父 repo 。
除了父 repo 会将所有其他 repos 引用为submodules
当子模块在父 repo 中签出时,它将在其自己的 (repo1, repo2, ...) 目录中签出。

您只需要调整buildbot Git 参数以考虑子模块。

submodules

(可选):在初始化/更新 Git 存储库时,这决定了 buildbot 是否应该考虑 git 子模块。
默认值:假。

于 2012-02-29T08:18:29.483 回答
1

使用 buildbot 0.8.5 及更高版本,您可以使用新的主端源步骤(它位于buildbot.steps.source.git.Git而不是builbot.steps.source.Git),然后Git(..., mode='full', ...)将执行 checkout plus git clean -xfd

此外,正在开展工作以正确支持对多个源代码的使用,这将在 buildbot 0.8.7 发布时包含在内。

于 2012-03-31T05:12:46.753 回答