Unclear documentation for Step templates

I have a package-based step template running a bash script and I can’t figure out how to pass a parameter to it.
The script expects the parameter to be simply pass with the script, so I pick it up like this:

The step template definition contains (also see pics):
Step->Script Parameters: #{PackageDir}
Parameters: #{PackageDir}

I have no idea if this is the right way to set this up. Some examples in the documentation would be awesome.
In any case, when creating a deployment project based on this, I have a 2-step process where the first step is called “Deploy Package” and simply deploys a nuget package. The second step is my step template, and for the “PackageDir” parameter, it gets:
#{Octopus.Action[Deploy package].Output.Package.DirectoryPath}

I would assume that the directory used in the first step would be passed to the script, but all I’m getting is weird strings such as


I’m unable to see where this comes from.

I’m assuming I’m doing something wrong. How can I wire up things so that the dir from the first step is passed to the second?


Thanks for getting in touch! Your issue appears to be with the variable you are using here. The directory output you are seeing is for the package before it has been extracted. The hexadecimal GUID you see is the string we create for the directory the package is stored in after it is pushed to the target. Would you be able to try substituting the variable #{Octopus.Action[Deploy package].Output.Package.DirectoryPath} with the following variable #{Octopus.Action[Deploy package].Package.InstallationDirectoryPath}.

This should output the correct path to the extracted application. It should give you a standard URL like: C:\InetPub\WWWRoot\OctoFx.

Let me know if the above has not resolved your issue, or if I have missed anything here. :slight_smile:

Best regards,

1 Like