#{Octopus.Tentacle.Agent.ApplicationDirectoryPath} not available when sending email

Le situation:

  • A customer is running the application from a share available to all computers in their domain
  • We deploy to a computer outside the domain. This computer does not have access to that domain share.
  • Then we need to inform their IT department that the application is updated and they must copy the files into the share before the customer can start using them.

Far from perfect, I know, but these are the limitations set by the customers IT department.

To remove manual labour from the process I looked into the “Send e-mail” step. And to be completely free from misunderstandings the email should include the source folder for the files.

Problem: The ApplicationDirectoryPath variable is not available, it will not resolve. It displays as #{Octopus.Tentacle.Agent.ApplicationDirectoryPath} in a test deployment where the email was sent to me.

Fair enough, since this is a new step and the new step does not know which tentacles the previous step executed on, am I right ?

It would be beneficial to be able to add email as a child step then, but this is not possible.

What to do ? Is there any solution that may help me ?

Hi Oskar,

Thanks for getting in touch! If you want to access a variable from a previous step you have to reference that step.
So you will have a variable such as: #{Octopus.Action[StepName].Output[Machinename].Package.InstallationDirectoryPath}
This will be available to you in the email step if you name the step name and the machine name it was available from.

Here is a blog post that explains it a bit more: http://octopusdeploy.com/blog/fun-with-output-variables

Hope that helps!