[Buildbot-devel] Add a property for WithProperties
Johnathan Hegge
qdev at oceanhills.net
Fri Sep 24 18:34:34 UTC 2010
I'm pythonically challenged here. I want to tag some SVN source before I build with sendchange. The "branch" property has the last bit of info I want for the tag. I need to strip the leading path (e.g. branches/my-branch to my-branch) and use that tail as a property.
I tried a couple of variations, one below to give the idea. Seems like I should be able to split this in the config. How do I make the variable available (adding it to buildbot.process.properties.Properties?) Am I trying to modify an immutable? Or, just needing to make a custom step?
def bare_branch(branch):
if (branch):
(head,tail) = os.path.split(branch)
return tail
return "Trunk"
c['bare'] = bare_branch
fac.addStep(ShellCommand(description='Tag SVN source for build revision',
command=["svn",
"copy",
WithProperties("-r%(got_revision)s"),
"-m'Tagged by production build'",
poq_svnURL,
WithProperties("http://svn.foo.com/svn/tags/POQ-%(poq_version)s-%(bare_branch)s-b%(buildnumber)s-r%(got_revision)s")]))
More information about the devel
mailing list