如何设置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,
))
这在我第一次标记提交时有效。但是当我第二次标记提交时,不会触发构建。
答案 0 :(得分:1)
最后我问了IRC。有人告诉我这是可能的:GitPoller
不是推荐的获取更改的方法,因此可能会有一些错误。
首选方法是在SCM服务器中设置钩子,并使用Buildbot的REST API将更改推送到Buildbot。