[Buildbot-devel] Perforce and getting stdin to slave

Dustin J. Mitchell dustin at v.igoro.us
Mon Nov 14 02:50:58 UTC 2011


On Tue, Nov 8, 2011 at 3:37 PM, Todd Cooper <todd_cooper at yahoo.com> wrote:
> I just started a new position where they are using Perforce.
>
> I have builds working using the p4 buildbot client, but there is nothing in
> the client to label the builds.
>
> In order to create a new label (or client) in perforce, the commands take
> stdin for the client description.
>
> In the p4 source connector on the slave this is accomplished by building a
> long string in python and then using the "log.msg" function in buildbot.
>
> Is there a way I can pass a stdin steps.ShellCommand or
> steps.MasterShellCommand so I don't have to hack the slave side?

There is - the initial_stdin argument can be passed to the slave side
"shell" command.  The master-side steps.ShellCommand does not have
explicit support for this feature, though, so you'll need to write a
custom step.  See the developer docs for a guide to doing so.

You could also consider doing it with a shell redirect.

Dustin




More information about the devel mailing list