[Buildbot-devel] Pass information from Trigger step to another
Kenny Ho
kenny.ho at jamdeo.com
Wed Dec 18 16:46:35 UTC 2013
Hi Olivier,
This is how I do it (if I didn't misunderstand you)
#triggering
buildFactory.addStep(trigger.Trigger(
name="Upload USB package to rackspace",
haltOnFailure=True,
schedulerNames=["trig-sch-upload-rackspace-ci"],
set_properties={
'upload_file_name':Property('upload_file_name'),
'upload_file_path':Property('upload_file_path')
},
waitForFinish=False))
#triggered
buildFactory.addStep(ShellCommand(name="Upload to rackspace",
haltOnFailure=True,
command=Interpolate('rackspaceUpload.py -i %(prop:upload_file_path)s -g abcde')))
Regards,
Kenny
________________________________
From: Olivier Trempe [oliviertrempe at gmail.com]
Sent: December 18, 2013 10:42 AM
To: Marc-Antoine Ruel
Cc: buildbot-devel
Subject: Re: [Buildbot-devel] Pass information from Trigger step to another
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<mailto: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<mailto: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<mailto: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<mailto: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<mailto: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/20131218/6f6166cb/attachment.html>
More information about the devel
mailing list