python - Buildbot and Multiple SVN Branches -
my svn repository layout...
project_name(root)/trunk /branches/ /branches/new_feature_of_trunk1 /branches/new_feature_of_trunk2 /tags/ /tags/etc1 /tags/etc2
i trying make buildbot build several branches of repository example... /trunk , /branches/new_feature_of_trunk1 .this how code it
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): name in change.files: if name.endswith(".c"): return true elif name.endswith(".h"): return true return false buildbot import scheduler 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] buildbot.process import factory buildbot.steps import source,shell buildbot.process.properties import withproperties 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 ) )
the problem this.. know added defaultbranch='trunk'. why checkout trunk not whole root? whenever remove defaultbranch. got error
exceptions.runtimeerror: svn source step belonging builder 'windows-x64-vs10' not know branch work with. means change source did not specify branch , defaultbranch none.
then code posted buildmaster tell slave build if there modified_files in /trunk or /branches/new_feature_of_trunk1.. if there modified in both branches in same svn revision. compile /trunk first before /branches/new_feature_of_trunk1...
but said doesn't work want
if single change set contains changes in both branches, 2 changes should created, , 1 build triggered each change.
Comments
Post a Comment