Rest API: Get Machine and deploy path for a deployment

Sean Amos's Avatar

Sean Amos

02 Aug, 2017 05:46 PM

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?

  1. Support Staff 1 Posted by John Simons on 03 Aug, 2017 12:00 AM

    John Simons's Avatar

    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

  2. 2 Posted by Sean Amos on 03 Aug, 2017 09:02 AM

    Sean Amos's Avatar

    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.

  3. Support Staff 3 Posted by John Simons on 04 Aug, 2017 12:19 AM

    John Simons's Avatar

    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....
    Then from Jenkins you read this artifact.
    Do you think this will help ?

    Cheers
    John

  4. 4 Posted by Sean Amos on 04 Aug, 2017 11:52 PM

    Sean Amos's Avatar

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

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac