如何使用 buildbot 构建每个标签?
How to build every tag with buildbot?
如何设置 Buildbot 来构建每个推送的标签?我当前的配置:
c["change_source"].append(changes.GitPoller(
repourl = "git@server:buildbot-test.git",
pollInterval = 3,
pollAtLaunch = True,
only_tags = True,
project = "buildbot-test",
buildPushesWithNoCommits = True,
))
c["schedulers"].append(schedulers.SingleBranchScheduler(
name = "buildbot-test",
change_filter = util.ChangeFilter(project = "buildbot-test"),
builderNames = ["buildbot-test"],
treeStableTimer = 10,
))
factory = util.BuildFactory()
factory.addStep(steps.Git(
repourl='git@server:buildbot-test.git',
progress=True,
))
factory.addStep(steps.ShellCommand(
name="Generate build stages",
command=["./build.sh", "--list-stages", util.Property("branch")],
haltOnFailure=True,
))
c['builders'].append(util.BuilderConfig(
name='buildbot-test',
description='Buildbot Test',
workernames=['my-worker'],
factory=factory,
))
这在我第一次标记提交时有效。但是当我第二次标记提交时,构建没有被触发。
最后我在IRC上问了。有人告诉我这是可能的:GitPoller
不是获得更改的推荐方式,因此它可能有一些错误。
首选方法是在 SCM 服务器中设置挂钩并使用 Buildbot 的 REST 将更改推送到 Buildbot API。
如何设置 Buildbot 来构建每个推送的标签?我当前的配置:
c["change_source"].append(changes.GitPoller(
repourl = "git@server:buildbot-test.git",
pollInterval = 3,
pollAtLaunch = True,
only_tags = True,
project = "buildbot-test",
buildPushesWithNoCommits = True,
))
c["schedulers"].append(schedulers.SingleBranchScheduler(
name = "buildbot-test",
change_filter = util.ChangeFilter(project = "buildbot-test"),
builderNames = ["buildbot-test"],
treeStableTimer = 10,
))
factory = util.BuildFactory()
factory.addStep(steps.Git(
repourl='git@server:buildbot-test.git',
progress=True,
))
factory.addStep(steps.ShellCommand(
name="Generate build stages",
command=["./build.sh", "--list-stages", util.Property("branch")],
haltOnFailure=True,
))
c['builders'].append(util.BuilderConfig(
name='buildbot-test',
description='Buildbot Test',
workernames=['my-worker'],
factory=factory,
))
这在我第一次标记提交时有效。但是当我第二次标记提交时,构建没有被触发。
最后我在IRC上问了。有人告诉我这是可能的:GitPoller
不是获得更改的推荐方式,因此它可能有一些错误。
首选方法是在 SCM 服务器中设置挂钩并使用 Buildbot 的 REST 将更改推送到 Buildbot API。