Recommended method to invoke Octopus API from TeamCity?

I’m looking to invoke Octopus API from TeanCity build step. It looks like PowerShell build step is the way to go, but it cannot find Octopus.Client.dll during script execution. What is the recommended way to make it available for the scripts? Octopus plugin for TeamCity is installed and I was hoping that it takes care of it, but it does not.

Thank you!

Hi Konstantine,

You would either have to load the Octopus.Client.dll assembly at the top of your PowerShell script providing the fully qualified path to where it is located on your TeamCity server (our plugin does not automagically do this for you as it is run as a separate thing) or you could just call the Octopus REST API directly using PowerShells Invoke-RestMethod cmdlet. We have this repository that provides examples of how to interact with the Octopus API using the different methods.

Thank you,