For some projects it returns the name of package for some projects it returns “Deploy”. SelectedPackages only have StepName and Version fields.
Are there any other methods to get a name of package associated with release. Or is there method to get package name from deployment process of project(from deployment step for example)?
I tried this:
Thanks for reaching out. You might wanna take a look at the Octoposh project, which has a couple of useful Powershel cmdlets to get info like the one you are asking for.
In this case you could use the cmdlet Get-OctopusDeployment which will return an object that looks like the one on the attached screenshot for each deployment. One of its properties contains all the packages used in that deployment.
We use Octopus 3.2.15. Maybe there was some bugs in this Octopus version? Also we use external nuget feed to store packages. We don’t use build-in Octopus feed.
That’s right - When you send the POST request to create a deployment, you are creating a document/db entry with the Package ID #{PackageID}. This is what both your script and the Octoposh cmdlet are retrieving.
During the deployment that variable gets resolved, but the resolved Package ID is not updated on the deployment doc.
Unfortunately there’s no way to programatically retrieve the package ID if you’re using a variable to declare it.