Octopus.Release.Package variable is empty

I’m trying to create a link to download the package file, where the link will get emailed to me, something like
http://OctopusServer.my.corp/app#/library/builtinrepository/packages-ThisApp.App.2019.9.5.6
For this, I need the package ID (I believe).

To confirm that’s what I need, I added this to a build step but it doesn’t get converted to a value or empty string. It stays just like this.
Release Package: #{Octopus.Release.Package}

Any idea why I’m not able to get package information from this variable?

I also tried these but they do not work either.
ID #{Octopus.Action.Package.PackageId}
Version #{Octopus.Action.Package.PackageVersion}
Release Package: #{Octopus.Release.Package}
#{each package in Octopus.Release.Package}
This release contains #{package.PackageId} #{package.Version}
#{/each}

Hi Mike,

Thanks for getting in touch! The Octopus.Release.Package variable is only populated if build information has been pushed from your build server. Does that match your scenario?

The other variables you’ve attempted are actually output variables, so when using them in a subsequent step you need to specify the step name which populated the variables. Does the following get the correct values in your email step?

ID #{Octopus.Action[PackageStepName].Package.PackageId}
Version #{Octopus.Action[PackageStepName].Package.PackageVersion}

I hope this helps! Let me know how you go or if you have any further questions going forward.

Best regards,

Kenny

1 Like

That worked! I’m all set now. Thanks!

Hi Mike,

That’s great to hear! Thanks for letting me know, and please don’t hesitate to reach out if you have any questions or concerns in the future. :slight_smile:

Best regards,

Kenny

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.