[Buildbot-devel] How to set a property in a BuildFactory()?

Georges Racinet gracinet at anybox.fr
Wed Jul 25 23:19:52 UTC 2012

Le 26/07/2012 00:56, William Deegan a écrit :
> Greetings,
> Is there a way to set a property who's value is a WithProperties() in a
> build factory such that it would be available to all the steps in the
> factory?


there's a SetProperty step

but it's the result of a command executed on the slave, which would 
force you to use it inside an echo... Hacky, and makes puzzling standard 
output, but works.

If that suits your cases, you can also manipulate the WithProperties 
format strings :
if composite_prop is the result of WithProperties(some_fmt), it's always 
possible to reuse some_fmt and write :
  WithProperties(some_fmt + '-%(other_prop)d ')
where you'd want to go with
But expressiveness is a bit limited.

I've also been setting properties as side-effects in functions such as 
doStepIf, but that's really ugly.

Hope this helps,

More information about the devel mailing list