[Buildbot-devel] Getting Properties value

sergio borghese sergio.borghese at gmail.com
Wed Sep 4 07:00:14 UTC 2013


Hi All,

Actually I thought the python code was executed "on-the-fly" when the build
was triggered.
I moved the Property() call inside the buildstep (ShellCommand) and used
Interpolate() to get the right string value to be passed to my script.
Thanks all for the clarifications and support

Best Regards
Sergio



On Wed, Sep 4, 2013 at 4:44 AM, Charles Lepple <clepple at gmail.com> wrote:

> On Sep 1, 2013, at 1:02 PM, sergio borghese wrote:
>
> > My understanding was that the Property object was returning integers,
> strings or some basic type
> > Tried converting the rev_no variable to str() or int() but got other
> errors instead
> >
> > I tried several changes to the above code, but no luck so far.
> > Probably it's just that I'm not a skilled Python coder...
>
> Here's how to think about the bits of Python in the configuration file:
> code outside of an explicit function definition is being executed only once
> when the Buildbot master starts up.
>
> For a Property, you want a different value each time you reference that
> Property name, so the code needs to be inside of a callback function (most
> likely in a subclass of a BuildStep). As Kevin pointed out, in that case,
> you need a context for the Property, and that context is usually a
> BuildStep, or an object that contains them. When you are looking at the
> examples, consider where the Property is coming from.
>
> --
> Charles Lepple
> clepple at gmail
>
>
>
>
>
> ------------------------------------------------------------------------------
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
> _______________________________________________
> Buildbot-devel mailing list
> Buildbot-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/buildbot-devel
>



-- 
preferisco ammazzare il tempo,
preferisco sparare cazzate,
preferisco fare esplodere una moda,
preferisco morire d'amore.
(Caparezza)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20130904/1aeffa98/attachment.html>


More information about the devel mailing list