[Buildbot-devel] Adding interpolated property in a build step

Philippe McLean philippe.mclean at gmail.com
Thu Jul 26 05:03:02 UTC 2012


One option is to extend/modify the definition of SetProperty in
buildbot/steps/shell.py.
Another possibility would be to use addFactoryArguments on any custom
buildsteps.

On Wed, Jul 25, 2012 at 9:11 PM, Todd Cooper <todd_cooper at yahoo.com> wrote:

> The problem is that you need to run SetProperty which needs to run an
> external command. I usually just have it run WithProperties("echo
> %(old_property1)s-%(old_property2)s") or whatever string you want to set
> which sets the new property. I agree there should be something to do this
> without running the external command. Enhancement request?
>
> Sent from Yahoo! Mail on Android
>
>  ------------------------------
> * From: * Alexander Sack <pisymbol at gmail.com>;
> * To: * Philippe McLean <philippe.mclean at gmail.com>;
> * Cc: * <buildbot-devel at lists.sourceforge.net>;
> * Subject: * Re: [Buildbot-devel] Adding interpolated property in a build
> step
> * Sent: * Thu, Jul 26, 2012 1:43:33 AM
>
>   On Wed, Jul 25, 2012 at 6:37 PM, Philippe McLean
> <philippe.mclean at gmail.com> wrote:
> > here is an example of using properties to save the output of a command
> > executed on the slave, then later using that value in another buildstep:
> >
> > # determine absolute path of build directory
> >    factory.addStep(SetProperty(command=["python", "-c", "import os, sys;
> > print os.getcwd(); sys.exit(0)"], property='absBuildDir'))
>
> Thank you.  However, that's not what I want!  (The doc is quite clear
> about the above).
>
> I want to be able to define a new property without executing a
> command.  The equivalent of:
>
> factory.addStep(add to the builds properties dictionary the following
> { 'filename' : WithProperties(my_file_%(suffix)s) })
>
> Then in another build step down the build
>
> factory.addStep(do something and use WithProperties(%(filename)s))
>
> etc.
>
> So I need:
>
> 1)  To define a property that does not need to execute anything external
> 2)  Be able to use that property with interpolation since its values
> are calculated at the time of the step
>
> Seems like a reasonable request to me!  :-)
>
> -aps
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Buildbot-devel mailing list
> Buildbot-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/buildbot-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20120725/5ef46849/attachment.html>


More information about the devel mailing list