Octo.exe command line tool on Ubuntu

Hi,

Currently we have a Jenkins slave (Windows) that as part of a job, runs the Octo.exe command line tool to kick off deployments. As such, the Octo tool is on the slave machine. We are looking at moving the job to run on an Ubuntu slave instead. I was wondering if the Octo tool will work in a Linux environment? Are there any other things to keep in mind?

Thanks,
Mark.

Hi Mark,

Thanks for getting in touch! You have a few options for kicking off deployments from Linux. We don’t officially support it, but Octo.exe works fine using mono as far as my testing has gone. Another option would be to write some scripting to hit the Octopus API directly, you can see our API documentation here, let me know if you want to go down that path and need some assistance. Finally we have just received a pull request from the community to add Deploy support to our octopackjs node tool (see here) so you could follow the process of that.

Hope that helps!

Mark

Hi Mark,

Thanks this helps a lot. I’m now planning to use curl on the Linux machine to send the API calls I need to make.

I’ve been looking at the Deployments page on the wiki: https://github.com/OctopusDeploy/OctopusDeploy-Api/wiki/Deployments

My question now, when sending a POST request to create a new deployment, is there a way to just specify the latest release for a project? I see the ReleaseId property is required.

What I’m trying to do in this instance is promote the latest release from one environment (dev) to the next (test).

Thanks,
Mark.

Hi Mark,

There’s no shortcut for this unfortunately. Under the covers Octo.exe hits the releases API endpoint for the project at /api/Releases?projects=Projects-1 and then orders the result by the Version to pick out the latest. You can also hit the /api/dashboard endpoint, which is used to build up the Dashboard when using the Web UI. the Items collection in the json returned contains the latest release for each project and environment (this might fit in more closely with what you’re trying to achieve).

Mark