How to execute Octo.exe from VSTS?

915 views Asked by At

I wish to execute Octo.exe from a powershell script on VSTS. Like this

Octo.exe push --package $_.FullName --replace-existing --server https://deploy.mydomain.com --apiKey API-xxxxxxxx

But I don´t know the correct path for Octo.exe or if it is present on the VSTS? Is it possible install it there? Or will i have to add the octo.exe to my source and call it from there?

2

There are 2 answers

1
starian chen-MSFT On BEST ANSWER

You can’t call Octo.exe command if using Hosted build agent and it is impossible to install it on build agent too.

If you can call Octo.exe without install it, you can add octo.exe to the source control and map to build agent (Repository > Mappings), then you can call it via PowerShell. The path could be like $(build.sourcesdirectory)\Tool\octo.exe, according to how do you map it to the source directory)

If Octo.exe requires to install, you need to set up an on premise build agent and install Octo on that build agent.

On the other hand, there is the extension of Octopus Deploy Integration that you can install and use it directly.

0
Luca Cappa On

Instead of cluttering source code repository with binaries, the cleanest approach is using the Octopus REST APIs for pushing a package.

An example on how to push a package is provided by the Octopus company itself.