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 : https://library.octopus.com/step-templates/850667b2-567d-46ba-a87d-d85dc31ebc83/actiontemplate-azure-web-app-set-app-settings
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:
BatchContainerRegistryImageName=#{azureWebAppSettings.Package.FeedId}/#{azureWebAppSettings.Package.PackageId}:#{azureWebAppSettings.Package.PackageVersion}
But the output log is returning this once variable substitution has been performed:
BatchContainerRegistryImageName=Feeds-1186/rmtech/warp/warp-batch:
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?
Thanks
Simon