[Buildbot-devel] dynamically finding the workdir for some build step

Amber Yust ayust at yelp.com
Sat Apr 30 02:18:56 UTC 2011


WithProperties. Also your SetProperty step needs a property name specified.

~Amber (sent from Droid, please forgive any typos!)
On Apr 29, 2011 7:09 PM, "Matthew Morse" <matt at apple.com> wrote:
> Hi,
>
> I haven't been having luck figuring this out, and it seems like it should
be easy (so I'm frustrated ;-).
>
> The problem is that I don't know the workdir for some step until runtime
(the folder name has a git hash in it that changes).
>
> But, I have a command that will find the proper path for me. So, I want to
run that command, get the path, and use it for the next build step. It looks
like a SetProperty step is what I want, but how do I pass the property
between buildsteps?
>
>
> Here's the situation in code:
>
>
--------------------------------------------------------------------------------
> def new_working_dir_path(rc, stdout, stderr):
> desired_path = stdout.strip()
> return { "desired_path" : desired_path }
>
>
> # Get path for following step
> builder.addStep(
> shell.SetProperty,
> command=some_command_that_prints_desired_path_to_stdout,
> extract_fn=new_working_dir_path,
> )
>
>
> builder.addStep(
> shell.ShellCommand,
> command=some_command_that_needs_to_execute_at_the_desired_path,
> workdir=<how do I get to the desired_path property?>,
> )
>
--------------------------------------------------------------------------------
>
>
> Thanks,
> - Matt
>
>
>
------------------------------------------------------------------------------
> WhatsUp Gold - Download Free Network Management Software
> The most intuitive, comprehensive, and cost-effective network
> management toolset available today. Delivers lowest initial
> acquisition cost and overall TCO of any competing solution.
> http://p.sf.net/sfu/whatsupgold-sd
> _______________________________________________
> 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/20110429/6de00b6a/attachment.html>


More information about the devel mailing list