Rest API: Get Machine and deploy path for a deployment

I can’t find a way to get the target machine and deploy path for a deployment via the rest API.

Is there a way to do this?

Hi Sean,

Unfortunately is not possible to get that information for a deployment.
Can you explain a bit more why you need this info ?

Cheers
John

I imagine it won’t be a common use case.

For now, most of our environment configuration is stored in Octopus library sets (API addresses etc.).
We have a CLI tool that will be executed by Jenkins that requires a lot of this configuration. It made sense to not duplicate this configuration somewhere else and let Octopus deploy the tool and handle it’s config transformation.

From Jenkins, it would have been nice to be able to query Octopus to find out the machine/path of where the latest version of the tool has been deployed, as opposed to hard coding the machine address and using powershell to search for it.

Hi Sean,

We may have a solution that could help you.
You need to create a custom step that dumps all the variables you are interested in, into a file (maybe json or some other format that you can read later), and then attach it as an artifact, see https://octopus.com/docs/deploying-applications/artifacts#Artifacts-Collectingartifactsusingscripts.
Then from Jenkins you read this artifact.
Do you think this will help ?

Cheers
John

Thanks John, I think that work! Will give it a try.