[Buildbot-devel] How to retrieve a property declared in the Waterfall Force Build Property boxes
John Ford
jhford at mozilla.com
Fri Aug 6 01:07:32 UTC 2010
On 8/5/10 4:34 PM, David Mor wrote:
>
> Dear Buildbot Developers,
>
> I have been reading through the manual hoping to find some clues on
> retrieving properties, which are set via the Waterfall's Force Build
> option, in my master.cfg file but have had no luck. I know that those
> properties are stored in the change object as the manual stated, but I
> have not discovered a way to retrieve them.
>
> Your help is highly appreciated.
>
> Sincerely,
>
> David Mor
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by
>
> Make an app they can't live without
> Enter the BlackBerry Developer Challenge
> http://p.sf.net/sfu/RIM-dev2dev
>
>
> _______________________________________________
> Buildbot-devel mailing list
> Buildbot-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/buildbot-devel
Hi David,
You can't use them directly in your master.cfg, but you can use them in
a WithProperties class. To do that you would can use the WithProperties
class.
from buildbot.steps.shell import WithProperties
Then you can can use it in part of a command
ShellCommand(command=['echo', WithProperties('Building %(buildername)s on %(slavename)s')])
This will run the command with the second argument being transformed
from 'Building on %(slavename)s' into something like 'Building osx build
on mac-slave1'. Any property that has already been set can be retrieved
at build time in this manner. You can also use WithProperties in the
environment and for the workdir if I remember correctly.
You can also use the buildbot.steps.shell.SetProperty class to set a
property however you like.
Hope that is helpful,
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20100805/78e7ebd4/attachment.html>
More information about the devel
mailing list