Get tentacle application path in variable

Sean Chambers's Avatar

Sean Chambers

31 Aug, 2011 12:12 AM via web

Some of my variables for environments need to know what folder the application is located. Is there a way I can add a replaceable to a variable that will get populated with the final path where the tentacle is hosting the application?

for instance, if I have a web.config appsetting that is:

It would be handy when declaring the upload_path variable for the different environments to be able to create the variable like so:

$OctopusParameters["application_root"]\uploads

Or something along those lines. Is there a way to do this?

  1. 2 Posted by Paul Stovell on 31 Aug, 2011 12:28 AM

    Paul Stovell's Avatar

    Hi Sean,

    Currently variables aren't calculated/evaluated, they are just static. From
    a PowerShell script however you can use the current directory
    (Environment.CurrentDirectory) to know the current path.

    It's a great suggestion though - adding to my backlog.

    Regards,

    Paul Stovell

  2. 3 Posted by Zach on 13 Sep, 2011 08:34 PM

    Zach's Avatar

    I wanted to throw in some support for this feature. A number of our applications' configs require absolute file paths to directories within the application. Most of our deployments wouldn't require any PowerShell scripting, so it would be extremely useful if there was an environment variable that included the application path since each release changes those paths.

  3. 4 Posted by Paul Stovell on 13 Sep, 2011 10:05 PM

    Paul Stovell's Avatar

    Thanks for the feedback on this item, I've added it to the list of features that will be in v1:

    http://www.paulstovell.com/octopus/features-for-v1

    Paul

  4. Paul Stovell closed this discussion on 13 Sep, 2011 10:05 PM.

Comments are currently closed for this discussion. You can start a new one.

Recent Discussions

18 May, 2012 06:38 PM
18 May, 2012 02:36 PM
18 May, 2012 02:35 PM
18 May, 2012 09:29 AM
18 May, 2012 08:25 AM

 

17 May, 2012 08:12 PM