[Buildbot-devel] Adding interpolated property in a build step

Philippe McLean philippe.mclean at gmail.com
Wed Jul 25 22:37:33 UTC 2012


here is an example of using properties to save the output of a command
executed on the slave, then later using that value in another buildstep:

# determine absolute path of build directory
    factory.addStep(SetProperty(command=["python", "-c", "import os, sys;
print os.getcwd(); sys.exit(0)"], property='absBuildDir'))


# execute a bat script inside that same directory
        factory.addStep(ShellCommand(description="change source folder",
command=["change_source_folder.bat", WithProperties("%(absBuildDir)s"),
config, "CONFIG", "%s" % dbname], workdir="build\\X\\Scripts",
name="change_source_folder.bat"));

On Wed, Jul 25, 2012 at 3:29 PM, Alexander Sack <pisymbol at gmail.com> wrote:

> Hello:
>
> I have read that build steps can set properties.  I'd like to have a
> step set a build property that will be interpolated at run-time and
> then re-used by another build step.
>
> Step X - create a file based on some interpolated properties, save the
> filename which is based on interpolated values in the build
> Step Y - use filename property
>
> The doc talks about setting shell based env and command based output.
> But how do I set a simple property from within a build step?  And can
> I use WithProperties()?
>
> Cheers,
>
> -aps
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> 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/20120725/04549344/attachment.html>


More information about the devel mailing list