Octopus Releaes for an envrionment for a Project

Dhananjaya Mata's Avatar

Dhananjaya Mata

12 Feb, 2018 03:46 AM

Hi There ,
is there a way to get the latest release deployed to an environment for a project using c# client .

  1. Support Staff 1 Posted by Kenneth Bates on 14 Feb, 2018 03:58 AM

    Kenneth Bates's Avatar

    Hi Dhananjaya,

    Thanks for getting in touch! You can use the GetReleases method in the Projects repository. Something like $repository.Projects.GetReleases($projectId). We have some great sample scripts in our public script repository which may help.
    https://github.com/OctopusDeploy/OctopusDeploy-Api/tree/master/Octo...

    This can also be done using OctoPosh, which is an open source module created by the community that provides cmdlets to interact with the API. Using it, you can easily search all the releases of a project and sort by latest with something like Get-OctopusRelease -ProjectName "Your Project" -Latest 1. You can check out the OctoPosh wiki which includes details on all of the available cmdlets if you're interested. :)
    http://octoposh.readthedocs.io/en/latest/

    I hope this helps! Don't hesitate to reach out if you have any further questions going forward.

    Best regards,

    Kenny

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