-
-
Notifications
You must be signed in to change notification settings - Fork 732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OctoPack doesn't work with OctopusTools v7.0.0 and higher #2828
Comments
From Version 7 and up OctopusTools is now a .NET Core 3.1 self-contained single-file Windows-only executable won't run under Mono. |
If you've got .NET Core on the Linux "Machine" you could switch to their global tool Octopus.DotNet.Cli. You can use the Cake.DotNetTool Module to install Example script: // Install modules
#module nuget:?package=Cake.DotNetTool.Module&version=0.4.0
// Install .NET Core Global tools.
#tool "dotnet:https://api.nuget.org/v3/index.json?package=Octopus.DotNet.Cli&version=7.4.1"
OctoPack("MyPackage",
new OctopusPackSettings {
Version = "1.0.0",
BasePath = "./bin",
OutFolder = "./out",
Overwrite = true
}); Example usage dotnet cake .\build.cake --bootstrap
dotnet cake .\build.cake
|
I can't get this to work on Linux because I'm running into this issue: I tried this on Windows, and it seems that it's trying to resolve |
Yes it'll resolve in the order
All Cake tools have a // Install modules
#module nuget:?package=Cake.DotNetTool.Module&version=0.4.0
// Install .NET Core Global tools.
#tool "dotnet:https://api.nuget.org/v3/index.json?package=Octopus.DotNet.Cli&version=7.4.1"
OctoPack("MyPackage",
new OctopusPackSettings {
Version = "1.0.0",
BasePath = "./bin",
OutFolder = "./out",
Overwrite = true,
ToolPath = Context.Tools.Resolve("dotnet-octo")
?? Context.Tools.Resolve("dotnet-octo.exe")
}); When running Cake.Tool I generally use dotnet tool manifest with repo so version of Cake is pinned in repo. You create a tool manifest by in repo root typing dotnet new tool-manifest Then install Cake dotnet tool install Cake.Tool This will create an Commit that to repo, then after one clone the repo usage is
Created a sample repo tried on Mac, Windows and docker. Example when I ran it in docker standard SDK container
|
Ok this is great information. I think what I was trying to do was mix our "old Cake build" (using What's the difference between registering a tool in the "dotnet tool manifest" ( |
The |
One key difference with tool manifest is that no shims are created so tool needs to be invoked using |
Ok that makes sense, thanks! This is tangentially related, but the https://www.gep13.co.uk/blog/introducing-cake.dotnettool.module Am I using this right?
|
Disregard! It looks like I'm encountering this problem instead: Thanks for all of the information @devlead! |
Great that you got it sorted👍 |
What You Are Seeing?
OctoPack()
fails when targeting version OctopusTools 7.0.0 and above. It works using the last v6, 6.17.6.What is Expected?
Using v6.17.6:
What version of Cake are you using?
0.38.4
Are you running on a 32 or 64 bit system?
64-bit
What environment are you running on? Windows? Linux? Mac?
Windows 10, 1809 hosting a Linux Docker image:
mcr.microsoft.com/dotnet/core/sdk:3.1, Debian 10 with Mono installed
Are you running on a CI Server? If so, which one?
N/A, local build
Output Log
#tool "nuget:?package=OctopusTools&version=7.0.0"
:The text was updated successfully, but these errors were encountered: