I’ve set up a deployment process with just 1 ‘Deploy a package’ step, this step uses a dynamic package ID, which is using a variable (
InternalCustomerName) from a common variable set which I created in the library
My project is setup to always require tenanted releases/deployments.
The issue I’m facing now, is when trying to create a release, it’s not allowing me to do so, because I need to specify a package version for the deployment step, but (presumably) since we can’t specify the tenant when creating a release, the package id is not resolved at release creation time, making it unable to select a version from the feed:
When clicking ‘Select version’ I get an empty list, with the unresolved feed name at the top:
Am I completely missing something here? Because this is pretty much a 1:1 copy of the example provided in the ‘Dynamically selecting packages’ article from the official docs
Thanks for getting in touch!
I have a suspicion that this may be caused by the package name variable being set in a Variable Set rather than a direct Project Variable.
I’m going to setup a test environment to check this out and will let you know what I find.
After doing some testing with this, I’ve concluded that your setup is correct and everything is working the way it should. The problem is that the documentation seems to skip over the part where you create the release.
As you surmised, because the tenant hasn’t been selected at the point of release creation, it isn’t possible for Octopus to automatically select a package, or to use the search function. This means that you have to enter the version number you want manually.
For the first deploy of this, I just entered 0.8, and now for this one 0.9. And then the creation of deployment works fine.
This has the caveat that it is creating an additional manual step and the possibility of entering a version number incorrectly. So, it would be worthwhile looking into having your build process automatically creating the releases for you after it adds the package to Octopus. This can be done either through the relevant Octopus plugin (TeamCity, Azure DevOps or Jenkins) or octo.exe
I hope this helps; let me know if you have any further questions.
Thanks Paul, this is working perfectly.
As you mention there’s a risk of error when creating releases manually, but since we’re using Teamcity to create those releases those occurrences should be kept to a minimum.