[Buildbot-devel] WithProperties?

William Siegrist wsiegrist at apple.com
Tue Dec 14 16:59:26 UTC 2010


On Dec 14, 2010, at 7:59 AM, Christian Unger wrote:

> 
> I'm sorry, but I am really having a hard time wrapping my brain around properties in buildbot.
> 
> so I have a BuildFactory, where I do an svn source checkout of 'projectName/trunk',
> where projectName is dynamic and can be set on the waterfall page as the branch property.
> the next step tags this as 'projectName/tags/current' by using a shell script which is able to determine the projectName without buildbot interaction.
> 
> now the third step should be able to checkout  'projectName/tags/current' and retrieve projectName from the build properties.
> my question is how to inject a regex into my build steps which extracts this string from the branch property.
> 


And if you have a string s with your branch info, and want the project via re:

import re
s = 'project/tags/current'
r = re.compile('([^\/]+)\/.*')
r.match(s).group(1)    # gives you 'project'

See also: http://docs.python.org/library/re.html

-Bill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20101214/7347cc28/attachment.html>


More information about the devel mailing list