[Buildbot-devel] WithProperties() in a buildstep?

Matthew Morse matt at apple.com
Tue Jun 21 18:28:21 UTC 2011


Tom,

Thanks for the hint, but I haven't been able to do much with it--this isn't territory I'm familiar with. 

Some questions:

- Are you suggesting I create a subclass of the Git buildstep, or dynamically add to its definition, or ???
- The attribute you refer to--is it part of the Git buildstep? How do I enumerate the attributes to see which one holds the branch arg?
- How do I add attributes to the renderables list?

Thanks for any light you can shed. If anyone has an example of accomplishing this sort of thing, I'd be most grateful!

- Matt



On Jun 17, 2011, at 8:50 AM PDT, Tom Prince wrote:

> On Thu, 16 Jun 2011 18:18:03 -0700, Matthew Morse <matt at apple.com> wrote:
>> ...which I think is because WithProperties isn't supported in a Git step.  Is there a workaround?
> 
> With 0.8.4, you need to see what attribute the branch argument is stored
> in, and add that to the renerables class attribute.
> 
>  Tom


On Jun 16, 2011, at 6:18 PM PDT, Matthew Morse wrote:

> Hi,
> 
> I'm using properties in ShellCommand steps like:
> 
> a_step = shell.ShellCommand(
>          description = "Adding buildstamp",
>          descriptionDone=["Finished","adding buildstamp"],
>          command = ["mv", "<foo>", WithProperties("%s-%d", "buildername", "buildnumber")],
>          workdir = dir,
>          haltOnFailure=True,
>     )
> 
> I'd like to also use them in other sorts of steps, but apparently that isn't supported (as I read the doc: http://buildbot.net/buildbot/docs/latest/full.html#WithProperties) . For example, I'd like a source.Git step to be able to look up the branch that triggered the build: 
> 
> lagos_setup_factory.addStep(
>         source.Git,
>         repourl= some_url, 
>         branch = WithProperties("%(the_branch)s", the_branch=determine_branch),
>         mode = "clobber",
>         submodules=False,
>         workdir="build",
>         haltOnFailure=True,
>     )
> 
> But,  I'm getting errors like:
> 
> fatal: Invalid refspec '+Unpersistable('Unpersistable data: instance of class buildbot.process.properties.WithProperties deemed insecure')'
> 
> ...which I think is because WithProperties isn't supported in a Git step.  Is there a workaround?
> 
> Thanks,
> - Matt
> 
> ------------------------------------------------------------------------------
> EditLive Enterprise is the world's most technically advanced content
> authoring tool. Experience the power of Track Changes, Inline Image
> Editing and ensure content is compliant with Accessibility Checking.
> http://p.sf.net/sfu/ephox-dev2dev_______________________________________________
> 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/20110621/75831dc0/attachment.html>


More information about the devel mailing list