Hi,
Need a help with list of application packages.
I have a requirement to get the list of all application packages (with version) that are used in an Octopus release for a project in a Power-Shell process step (which is in the same project).
I can see the names in Acquiring Packages logs (not in the proper format though). But I need it in the script.
Is it available through a Power-Shell variable or by any other means?
Hi @Falcon_Francis ,
Thanks for getting in touch! This has been resolved in another thread over here:
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 …
However I’ll share the answer here for visibility. We have a System Variable which will return the version for a package associated with a step:
Octopus.Action.Package.PackageVersion
Using this variable in your deployment, you can target any step in your deployment with the action part of the variable like below:
Octopus.Action[Step-Name].Package.PackageVersion
We have some further information on different variables available during your deployment on our System Variables documentation page.
Please feel free to get in touch if you have any questions at all here.
Best regards,
Daniel
1 Like
system
(system)
Closed
July 28, 2019, 4:24am
4
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.