Getting full container name from package reference

Hi There,

Hoping for some help with package references. I have an Azure web app that takes a configuration setting as a full docker container name. Something along the lines of {containerRegistryHostname}/{Repo}/{ImageName}:{VersionTag}

I’ve created my own step template starting from this :

That includes a package reference, the variable for the package reference is : azureWebAppSettings.Package

I’ve setup Octopus with a connection to the container registry in the library.

I’ve added the step to my project and when I create a release Octopus can see the correct version of my container from the registry.

However I’m struggling getting the full registry hostname AND more importantly the package version as a variable from the PackageReference variable so that I can set it in my Azure webapp.

My azureWebAppSettings.settings parameter is set to this:


But the output log is returning this once variable substitution has been performed:


So my questions come down to this:

  • How do I get the full feed URL/Hostname of the feed from a package reference?
  • How do I get the selected package version from a package reference?



Hi Simon,

I’ve copied here some output from some variables. Have a look at these as I think they’ll give you what you need. Customize for your scenario, obviously.

[Octopus.Action.Package[hello-world].Image] = ''
[Octopus.Action.Package[hello-world].PackageId] = 'hello-world'
[Octopus.Action.Package[hello-world].PackageVersion] = 'latest'
[Octopus.Action.Package[hello-world].Registry] = ''

Hope this helps! Please let us know if you have further questions.


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