List of all packages used in a release

Hi,
We have a requirement to list down all the latest releases for all the environments and then to list down the packages that are included in the deployment.

We are able to list down all the latest releases with
.\Octo.exe -list-deployments -server $env:OctopusURL -apiKey $env:OctopusAPIKey -environment “” -tenant “” -project $prj -number=1

But not sure how we can get the packages list.
The same command gives the packages list but it gives the versions in this format
*Process step name eg: *
Package Versions: Deploying My_Application 4.2.6

where we need the same in this format
*Package Name eg: *
My_Application_Package 1.2.234

I already checked few threads like List packages for a Release
But these scripts has to be executed either from the same release which uses these packages.

Please let me know if you have any method to get using Octo.exe or using some other powershell scripts.

We were able to implement something similar with

$packagenumber=$OctopusParameters[“Octopus.Action[$stepname].Package.PackageVersion”]

This will give the package name used in a step. So you can close the thread now.

Thank you

1 Like

Hi @Falcon_Francis,

Thanks for getting in touch! I’m glad to hear you found this variable. I was going to link you the following documentation page which has a list of available System Variables in Octopus. It can be handy for finding helpful variables like this.

If you have any further questions, please don’t hesitate to let me know.

Best regards,
Daniel

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