Is there a way to get the NuGet Package version into a variable that I can use in a step to send an email out when the deployment is finished? I looked at the existing variables and could not find one that includes the NuGet Package version.
Hi Dean; Octopus 2.0 provides the variable “Octopus.Action.Package.NuGetPackageVersion” for each step - you should be able to use it like this in your email template:
We just deployed Foo version #{Octopus.Action[Foo Step].Package.NuGetPackageVersion}
I.e. you should use the step name to index the Action part of the variable.
That worked perfectly. That option doesn’t show up in the dropdown, but I just selected “#{Octopus.Action[Foo Step].Package.NuGetPackageId}” and changed “Id” to “Version”.
Note that the Octopus server is the machine that sends out the email, so you will have to define the machine name where you define the variable after Action{stepname].Output[machinename]