Octopus Deploy aliases are not cross platform
Prerequisites
- [x] I have written a descriptive issue title
- [x] I have searched issues to ensure it has not already been reported
Cake runner
Cake .NET Tool
Cake version
latest
Operating system
N/A
Operating system architecture
x64
CI Server
No response
What are you seeing?
Currently, the Octopus Deploy aliases are not able to be used seamlessly in a cross platform environment.
var settings = new CreateReleaseSettings
{
DefaultPackageVersion= version,
ReleaseNumber = version,
Server = "https://octopus.blah.com",
ApiKey = myKey,
};
OctoCreateRelease(myProjectName, settings);
What is expected?
Creating an OctopusRelease or any octopus action should work as expected when run from a windows machine or a linux machine.
My recommendation is the OctopusDeployAliases in cake should be updated to utilize the Octopus.Client Nuget package under the covers.
#addin nuget:?package=Octopus.Client
This will allow it to work cross platform and prevent others from running into the same issue.
Steps to Reproduce
Simply run OctoCreateRelease octopus deploy alias on a linux machine.
Output log
An error occurred when executing task 'OctopusRelease'.
20:01:13 Error: An error occurred trying to start process '/root/buildAgent/work/be2205749207cff5/tools/OctopusTools.9.1.7/tools/octo.exe' with working directory '/root/buildAgent/work/be2205749207cff5'. No such file or directory
What is the actual error that occurs?
Can you update the issue with a stack trace?
Thanks
@gep13
Updated
Until a while ago the cross platform CLI to install was Octopus.DotNet.Cli, and it can be installed using the tool directive
#tool dotnet:?package=Octopus.DotNet.Cli&version=9.1.7
That said Jun 13 this year (2025) that project was archived, it might still be able to be used, haven't tried it myself.
The official CLI now is Octopus Deploy cli, it's not an drop in replacement for the previous .NET cli, it has different args, so won't work with current Cake aliases.
Personally I would be hesitant to take on a third party dependency for just a small subset of aliases, used by a subset of Cake users.
Cake.Tool supports adding references to NuGet dependencies so Octopus.Client should work just fine already, with Frosting/SDK it's just a regular NuGet reference.