[Buildbot-devel] Pass information from Trigger step to another

Olivier Trempe oliviertrempe at gmail.com
Thu Dec 19 20:15:56 UTC 2013


Thanks all!

I felt like I was in a dead end and now I have a workaround. I used an
"enhanced" version of Mihai's solution.

I indeed wanted to store the artifacts under the Builder1's name and
number. I just added a step to create a symlink with Builder3's name and
number pointing to artifacts. Then in Builder2, I just need to use this
symlink to access the artifacts.




On Wed, Dec 18, 2013 at 11:14 AM, Mihai Martalogu <mihai at martalogu.com>wrote:

> Hello Olivier,
>
> I don’t know if there is a mechanism for exactly what you described, but
> it might be easier in your particular scenario to just directly use
> Builder3’s (the original trigger*ing* builder) builder name and number, and
> pass it as properties to both triggered builders (Builder1 and Builder2).
> Builder1 can then upload the artifacts to the master using Builder3’s
> builder name and number as path reference, and Builder2 will download them
> using the same reference.
>
>
> This is almost exactly what you described in your last mail, but a bit
> simpler (no passing the build name/number as file contents).
>
> Unless for some reason you *really* need it to be Builder1’s build name
> and number…
>
> Cheers,
> Mihai
> On 18 Dec 2013, at 16:42, Olivier Trempe <oliviertrempe at gmail.com> wrote:
>
> > After trying all kinds things with properties, set_properties,
> Triggerable and Trigger, I still don't get it.
> >
> > I don't need to create build properties on the triggered build. I need
> to retrieve properties from the triggered to use them in another step.
> >
> > In the thread cited in my first post, Dustin seems to say that it is not
> possible to achieve what I need:
> > "It sounds like Ryan needs to go the other direction -- from the
> > triggere*d* builds to the trigger*ing* build.  I don't know of an easy
> > way to do that." - Dustin
> >
> > The only way I can think of doing this for now is:
> >
> > - Pass the trigger*ing* build name and number as property to trigger*d*
> build.
> > - Add a step to the trigger*d* build which will upload a file to the
> master in a folder named after the trigger*ing* build name and number. The
> file content is the name and number of the trigger*d* build.
> > - Download and read the file in another trigger*d* build.
> >
> >
> >
> > On Tue, Dec 17, 2013 at 3:47 PM, Marc-Antoine Ruel <maruel at chromium.org>
> wrote:
> >
> http://docs.buildbot.net/latest/manual/cfg-schedulers.html#triggerable-scheduler
> > Triggerable supports static properties.
> >
> >
> http://docs.buildbot.net/latest/manual/cfg-buildsteps.html?highlight=trigger%20trigger#triggering-schedulers
> > trigger.Trigger supports adding dynamic properties with set_properties.
> You create the build properties needed on the triggered build at Trigger
> time.
> >
> > M-A
> >
> >
> >
> >
> >
> > 2013/12/17 Olivier Trempe <oliviertrempe at gmail.com>
> > I am not sure I understand what you mean.
> >
> > In "Builder3", I want to get the buildnumber and buildname of triggered
> "Builder1" and pass them to "Builder2".
> >
> > I know that I can use WithProperties (now Interpolate since
> WithProperties is deprecated) to pass properties to "Builder2"
> >
> > What I don't know is how to get these properties from a Trigger step
> from within the factory assigned to "Builder3".
> >
> > Can you provide me with a small example?
> >
> > Thanks!
> >
> >
> >
> >
> > On Tue, Dec 17, 2013 at 2:15 PM, Marc-Antoine Ruel <maruel at chromium.org>
> wrote:
> > You can use build properties that you pass along when you trigger the
> steps and then use WithProperties in the command line of the steps you call.
> >
> > ref: http://docs.buildbot.net/latest/manual/cfg-properties.html
> >
> > M-A
> >
> >
> > 2013/12/17 Olivier Trempe <oliviertrempe at gmail.com>
> > Hello,
> >
> > I already found this thread (
> http://sourceforge.net/mailarchive/message.php?msg_id=30096787) which
> mentions the kind of feature I am looking for. It is now more than 1 year
> old and I hope the solution exists now.
> >
> > My use case is the following
> > "Builder1": Builds an application and archive artifacts with a
> DirectoryUpload step in a folder on the maser. The folder is named after
> the build name and number. Can be executed on any slave.
> >
> > "Builder2": Download artifact from another builder based on build name
> and number. Do something with artifacts. Can be executed on any slave.
> >
> > "Builder3": Trigger Builder1, then trigger Builder2 with build name and
> number retrieved from first trigger step. Can be executed on any slave.
> >
> > Is there a way to retrieve parameter from a step and pass it to another?
> >
> > Thanks!
> >
> > Olivier Trempe
> >
> >
> ------------------------------------------------------------------------------
> > Rapidly troubleshoot problems before they affect your business. Most IT
> > organizations don't have a clear picture of how application performance
> > affects their revenue. With AppDynamics, you get 100% visibility into
> your
> > Java,.NET, & PHP application. Start your 15-day FREE TRIAL of
> AppDynamics Pro!
> >
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
> > _______________________________________________
> > Buildbot-devel mailing list
> > Buildbot-devel at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/buildbot-devel
> >
> >
> >
> >
> >
> >
> ------------------------------------------------------------------------------
> > Rapidly troubleshoot problems before they affect your business. Most IT
> > organizations don't have a clear picture of how application performance
> > affects their revenue. With AppDynamics, you get 100% visibility into
> your
> > Java,.NET, & PHP application. Start your 15-day FREE TRIAL of
> AppDynamics Pro!
> >
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk_______________________________________________
> > 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/20131219/82e09948/attachment.html>


More information about the devel mailing list