Python Buildbot和多个SVN分支
我的SVN存储库布局Python Buildbot和多个SVN分支,python,svn,buildbot,Python,Svn,Buildbot,我的SVN存储库布局 Project_Name(root)/trunk /branches/ /branches/new_feature_of_trunk1 /branches/new_feature_of_trunk2 /tags/ /tags/ETC1 /tags/ETC2 我试图让buildbot构建我的存储库的几个分支,例如/trunk和/分支
Project_Name(root)/trunk
/branches/
/branches/new_feature_of_trunk1
/branches/new_feature_of_trunk2
/tags/
/tags/ETC1
/tags/ETC2
我试图让buildbot构建我的存储库的几个分支,例如/trunk和/分支/trunk1的新功能。我就是这样编码的
from buildbot.changes.svnpoller import SVNPoller, split_file_branches
source_code_svn_url='http://domain.com/svn/Project_Name/'
c['change_source'].append(
SVNPoller(
svnurl=source_code_svn_url,
split_file=split_file_branches,
pollinterval=60,
histmax=10,
)
)
def modified_files(change):
for name in change.files:
if name.endswith(".c"):
return True
elif name.endswith(".h"):
return True
return False
from buildbot import scheduler
from buildbot.changes.filter import ChangeFilter
s1=scheduler.AnyBranchScheduler(
name="Project_Test",
treeStableTimer=2*60,
change_filter=ChangeFilter(
branch=[
'trunk',
'branches/new_feature_of_trunk1'
]
),
builderNames=[
"Windows-x64-VS10",
],
fileIsImportant=modified_files
)
c['schedulers']=[s1]
from buildbot.process import factory
from buildbot.steps import source,shell
from buildbot.process.properties import WithProperties
from buildbot.config import BuilderConfig
step_source_svn=source.SVN(
mode='copy',
baseURL=source_code_svn_url,
defaultBranch='trunk',
retry=(30,2)
)
f2=factory.BuildFactory()
f2.addStep(step_source_svn)
f2.addStep(
shell.Compile(
command=[
"devenv.com",
"MakeMe.sln",
"/build",
"Release^|Win32"
],
logEnviron=False
)
)
问题是。。我知道我加上了defaultBranch='trunk'。但为什么它只收银台呢
不是整个根?然后每当我把它移走的时候。我犯了这个错误
exceptions.RuntimeError:属于生成器的SVN源步骤
“Windows-x64-VS10”不知道使用哪个分支。这意味着
更改源未指定分支和defaultBranch
没有
然后,我发布的代码是让我的buildmaster告诉从机构建是否在/trunk或/branchs/new\u-feature\u中有修改的\u文件。。如果在同一SVN版本中的两个分支中都有修改。然后它将先编译/trunk,然后再编译/branchs/new\u-feature\u-of\u-trunk1
但正如我所说
它不像我想要的那样工作如果一个更改集在两个分支中都包含更改,那么应该创建两个更改,并为每个更改触发一个生成。我知道这是一篇旧文章,但对于其他任何一位这样做的人来说,这可能会有所帮助: 您需要为分支创建调度程序。现在看起来您只有一个分支建筑,但是如果您有一个通过分支的调度程序,它可能对您更有利
Nightly(name="new1", builderNames=["Project_Test"], branch="branches/new_feature_of_trunk1", onlyIfChanged=True, hour=range(0, 24, 2)),
Nightly(name="new2", builderNames=["Project_Test"], branch="branches/new_feature_of_trunk2", onlyIfChanged=True, hour=range(0, 24, 2)),
如果您希望一次签出所有内容,并且您的编译步骤生成了所有分支,那么您的源代码svn url需要高出一个分支