I have Parent Orchestrator Project that have multiple projects included via process step: Deploy a Release. And each included project can have multiple packages to deploy.
Please, is there some way to get all project release versions included in specific Parent Project release via Octopus API? I want to make some script to check all included project releases versions, but now I can get only included packages versions from API.
I want to make sure I understand what you’re asking - you’re looking for an API call to return all of the package versions for the projects deployed in your orchestration project?
For instance, if your orchestration project deploys a project called MyProject (including packages MyApp and MyDatabase) and a project called AnotherProject (including packages AnotherApp and AnotherDatabase), and you deployed a release version 2021.08.18 it with:
MyApp 1.0.1
MyDatabase 1.0.6
AnotherApp 1.0.3
AnotherApp 1.0.2
You want to be able to query your orchestration release for 20201.08.18 and return the deployed versions for each package?
I don’t want to know packages, just versions of project releases.
For example I have orchestrator project MyProject and two child projects and I want to know only versions of that projects - because I need to check if that Project release was deployed in Dev or Test or actual progression of that release.
I’m going to do some more digging on the correct API calls to return the information you’re looking for.
In the meantime, I noticed you’re using the Deploy a Release step for orchestration - have you looked at the Deploy Child Octopus Deploy Project step template outlined in this post? It offers some better functionality for managing/promoting releases in the way you’re describing. Specifically, it has both a promote and a redeploy mode to make version management easier when orchestrating multiple project deployments.
For getting released versions, I’d look at the API call for GET /releases/{ID}
This call returns JSON, including a collection called SelectedPackages, which represent the packages and versions that were included in the release.
You can also take a look at this sample API script, which uses the Progression API to get the most recent release for a project/environment combo. It also returns the Release ID that you can feed to the above call to get your specific package versions.
I hope this helps, let me know if you have any other questions!
And I am sorry, because I didn’t see that SelectedPackages property. We have one big orchestrator project and I scrolled down that response, but I cannot find that, because it is in the very bottom of that json Sorry for that, and thanks for the solution with script.