Skip to content

OctoPack doesn't work on Linux #2535

@trondhindenes

Description

@trondhindenes

What You Are Seeing?

OctoPack fails with Octo: Could not locate executable. On the same build, OctoCreateRelease succeeds. See stacktrace at bottom of this issue

What is Expected?

OctoPack should work

What version of Cake are you using?

tested with both 0.30.0 and 0.28.0

Are you running on a 32 or 64 bit system?

64

What environment are you running on? Windows? Linux? Mac?

Linux

Are you running on a CI Server? If so, which one?

Fails both locally and in ci. Using Gitlab-runner.

How Did You Get This To Happen? (Steps to Reproduce)

Just created an OctoPack step, nothing special

Output Log

The weird thing here is that one "octo command" succeeds, the other does not. This leads me to believe that there's an error in how OctoPack resolves its tool path. I've also tried using the ToolPath parameter in the settings object to manually specify the path to the octo.exe package, but it doesn't help.

There is very little (none, really) logging around how Octopus resolves tools paths, so it's pretty much a black box when it fails.

Stacktrace:

Executing task: Pack
An error occurred when executing task 'Pack'.
Error: System.AggregateException: One or more errors occurred. (Octo: Could not locate executable.) ---> Cake.Core.CakeException: Octo: Could not locate executable.
  at Cake.Core.Tooling.Tool`1[TSettings].RunProcess (TSettings settings, Cake.Core.IO.ProcessArgumentBuilder arguments, Cake.Core.IO.ProcessSettings processSettings) [0x00071] in <1a12afcf649f4de8ab5d15d82d4f6310>:0 
  at Cake.Core.Tooling.Tool`1[TSettings].Run (TSettings settings, Cake.Core.IO.ProcessArgumentBuilder arguments, Cake.Core.IO.ProcessSettings processSettings, System.Action`1[T] postAction) [0x0001c] in <1a12afcf649f4de8ab5d15d82d4f6310>:0 
  at Cake.Core.Tooling.Tool`1[TSettings].Run (TSettings settings, Cake.Core.IO.ProcessArgumentBuilder arguments) [0x00000] in <1a12afcf649f4de8ab5d15d82d4f6310>:0 
  at Cake.Common.Tools.OctopusDeploy.OctopusDeployPacker.Pack (System.String id, Cake.Common.Tools.OctopusDeploy.OctopusPackSettings settings) [0x00017] in <d84cb7ae67bd4bf69897adf81e34714b>:0 
  at Cake.Common.Tools.OctopusDeploy.OctopusDeployAliases.OctoPack (Cake.Core.ICakeContext context, System.String id, Cake.Common.Tools.OctopusDeploy.OctopusPackSettings settings) [0x00039] in <d84cb7ae67bd4bf69897adf81e34714b>:0 
  at Submission#0.OctoPack (System.String id, Cake.Common.Tools.OctopusDeploy.OctopusPackSettings settings) [0x0000c] in <dba5a7c70e1f4221b4db7847fb712bc6>:0 
  at Submission#0.<<Initialize>>b__0_2 (RiksTV.Cake.BuildContext context) [0x0006b] in <dba5a7c70e1f4221b4db7847fb712bc6>:0 
  at Cake.Core.CakeTaskBuilderExtensions+<>c__DisplayClass18_0`1[TData].<Does>b__0 (Cake.Core.ICakeContext context, TData data) [0x00000] in <1a12afcf649f4de8ab5d15d82d4f6310>:0 
  at Cake.Core.CakeTaskBuilderExtensions+<>c__DisplayClass23_0`1[TData].<Does>b__0 (Cake.Core.ICakeContext context) [0x0000c] in <1a12afcf649f4de8ab5d15d82d4f6310>:0 
  at Cake.Core.CakeTaskBuilderExtensions+<>c__DisplayClass20_0.<Does>b__0 (Cake.Core.ICakeContext x) [0x00000] in <1a12afcf649f4de8ab5d15d82d4f6310>:0 
  at Cake.Core.CakeTask.Execute (Cake.Core.ICakeContext context) [0x00066] in <1a12afcf649f4de8ab5d15d82d4f6310>:0 
  at Cake.Core.DefaultExecutionStrategy.ExecuteAsync (Cake.Core.CakeTask task, Cake.Core.ICakeContext context) [0x000ee] in <1a12afcf649f4de8ab5d15d82d4f6310>:0 
  at Cake.Core.CakeEngine.ExecuteTaskAsync (Cake.Core.ICakeContext context, Cake.Core.IExecutionStrategy strategy, System.Diagnostics.Stopwatch stopWatch, Cake.Core.CakeTask task, Cake.Core.CakeReport report) [0x00131] in <1a12afcf649f4de8ab5d15d82d4f6310>:0 
  at Cake.Core.CakeEngine.RunTask (Cake.Core.ICakeContext context, Cake.Core.IExecutionStrategy strategy, Cake.Core.CakeTask task, System.String target, System.Diagnostics.Stopwatch stopWatch, Cake.Core.CakeReport report) [0x00124] in <1a12afcf649f4de8ab5d15d82d4f6310>:0 
  at Cake.Core.CakeEngine.RunTargetAsync (Cake.Core.ICakeContext context, Cake.Core.IExecutionStrategy strategy, Cake.Core.ExecutionSettings settings) [0x00338] in <1a12afcf649f4de8ab5d15d82d4f6310>:0 
  at Cake.Scripting.BuildScriptHost.RunTargetAsync (System.String target) [0x0009f] in <52bc22bce5254240ba373b3cf23da1ab>:0 
  at Cake.Core.Scripting.ScriptHost.RunTarget (System.String target) [0x0000d] in <1a12afcf649f4de8ab5d15d82d4f6310>:0 
  at Submission#0+<<Initialize>>d__0.MoveNext () [0x00122] in <dba5a7c70e1f4221b4db7847fb712bc6>:0 
  at Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.RunSubmissionsAsync[TResult] (System.Collections.Immutable.ImmutableArray`1[T] precedingExecutors, System.Func`2[T,TResult] currentExecutor, System.Runtime.CompilerServices.StrongBox`1[T] exceptionHolderOpt, System.Func`2[T,TResult] catchExceptionOpt, System.Threading.CancellationToken cancellationToken) [0x00186] in <3ee4bd870c1146d59b98317e4bbdcbe8>:0 
  at Microsoft.CodeAnalysis.Scripting.Script`1[T].RunSubmissionsAsync (Microsoft.CodeAnalysis.Scripting.ScriptExecutionState executionState, System.Collections.Immutable.ImmutableArray`1[T] precedingExecutors, System.Func`2[T,TResult] currentExecutor, System.Func`2[T,TResult] catchExceptionOpt, System.Threading.CancellationToken cancellationToken) [0x000a8] in <3ee4bd870c1146d59b98317e4bbdcbe8>:0 
   --- End of inner exception stack trace ---
  at System.Threading.Tasks.Task.ThrowIfExceptional (System.Boolean includeTaskCanceledExceptions) [0x00011] in <6649516e5b3542319fb262b421af0adb>:0 
  at System.Threading.Tasks.Task.Wait (System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken) [0x00043] in <6649516e5b3542319fb262b421af0adb>:0 
  at System.Threading.Tasks.Task.Wait () [0x00000] in <6649516e5b3542319fb262b421af0adb>:0 
  at Cake.Scripting.Roslyn.RoslynScriptSession.Execute (Cake.Core.Scripting.Script script) [0x001a7] in <52bc22bce5254240ba373b3cf23da1ab>:0 
  at Cake.Core.Scripting.ScriptRunner.Run (Cake.Core.Scripting.IScriptHost host, Cake.Core.IO.FilePath scriptPath, System.Collections.Generic.IDictionary`2[TKey,TValue] arguments) [0x00358] in <1a12afcf649f4de8ab5d15d82d4f6310>:0 
  at Cake.Commands.BuildCommand.Execute (Cake.CakeOptions options) [0x0003f] in <52bc22bce5254240ba373b3cf23da1ab>:0 
  at Cake.CakeApplication.Run (Cake.CakeOptions options) [0x00015] in <52bc22bce5254240ba373b3cf23da1ab>:0 
  at Cake.Program.Main () [0x000d1] in <52bc22bce5254240ba373b3cf23da1ab>:0 
---> (Inner Exception #0) Cake.Core.CakeException: Octo: Could not locate executable.
  at Cake.Core.Tooling.Tool`1[TSettings].RunProcess (TSettings settings, Cake.Core.IO.ProcessArgumentBuilder arguments, Cake.Core.IO.ProcessSettings processSettings) [0x00071] in <1a12afcf649f4de8ab5d15d82d4f6310>:0 
  at Cake.Core.Tooling.Tool`1[TSettings].Run (TSettings settings, Cake.Core.IO.ProcessArgumentBuilder arguments, Cake.Core.IO.ProcessSettings processSettings, System.Action`1[T] postAction) [0x0001c] in <1a12afcf649f4de8ab5d15d82d4f6310>:0 
  at Cake.Core.Tooling.Tool`1[TSettings].Run (TSettings settings, Cake.Core.IO.ProcessArgumentBuilder arguments) [0x00000] in <1a12afcf649f4de8ab5d15d82d4f6310>:0 
  at Cake.Common.Tools.OctopusDeploy.OctopusDeployPacker.Pack (System.String id, Cake.Common.Tools.OctopusDeploy.OctopusPackSettings settings) [0x00017] in <d84cb7ae67bd4bf69897adf81e34714b>:0 
  at Cake.Common.Tools.OctopusDeploy.OctopusDeployAliases.OctoPack (Cake.Core.ICakeContext context, System.String id, Cake.Common.Tools.OctopusDeploy.OctopusPackSettings settings) [0x00039] in <d84cb7ae67bd4bf69897adf81e34714b>:0 
  at Submission#0.OctoPack (System.String id, Cake.Common.Tools.OctopusDeploy.OctopusPackSettings settings) [0x0000c] in <dba5a7c70e1f4221b4db7847fb712bc6>:0 
  at Submission#0.<<Initialize>>b__0_2 (RiksTV.Cake.BuildContext context) [0x0006b] in <dba5a7c70e1f4221b4db7847fb712bc6>:0 
  at Cake.Core.CakeTaskBuilderExtensions+<>c__DisplayClass18_0`1[TData].<Does>b__0 (Cake.Core.ICakeContext context, TData data) [0x00000] in <1a12afcf649f4de8ab5d15d82d4f6310>:0 
  at Cake.Core.CakeTaskBuilderExtensions+<>c__DisplayClass23_0`1[TData].<Does>b__0 (Cake.Core.ICakeContext context) [0x0000c] in <1a12afcf649f4de8ab5d15d82d4f6310>:0 
  at Cake.Core.CakeTaskBuilderExtensions+<>c__DisplayClass20_0.<Does>b__0 (Cake.Core.ICakeContext x) [0x00000] in <1a12afcf649f4de8ab5d15d82d4f6310>:0 
  at Cake.Core.CakeTask.Execute (Cake.Core.ICakeContext context) [0x00066] in <1a12afcf649f4de8ab5d15d82d4f6310>:0 
  at Cake.Core.DefaultExecutionStrategy.ExecuteAsync (Cake.Core.CakeTask task, Cake.Core.ICakeContext context) [0x000ee] in <1a12afcf649f4de8ab5d15d82d4f6310>:0 
  at Cake.Core.CakeEngine.ExecuteTaskAsync (Cake.Core.ICakeContext context, Cake.Core.IExecutionStrategy strategy, System.Diagnostics.Stopwatch stopWatch, Cake.Core.CakeTask task, Cake.Core.CakeReport report) [0x00131] in <1a12afcf649f4de8ab5d15d82d4f6310>:0 
  at Cake.Core.CakeEngine.RunTask (Cake.Core.ICakeContext context, Cake.Core.IExecutionStrategy strategy, Cake.Core.CakeTask task, System.String target, System.Diagnostics.Stopwatch stopWatch, Cake.Core.CakeReport report) [0x00124] in <1a12afcf649f4de8ab5d15d82d4f6310>:0 
  at Cake.Core.CakeEngine.RunTargetAsync (Cake.Core.ICakeContext context, Cake.Core.IExecutionStrategy strategy, Cake.Core.ExecutionSettings settings) [0x00338] in <1a12afcf649f4de8ab5d15d82d4f6310>:0 
  at Cake.Scripting.BuildScriptHost.RunTargetAsync (System.String target) [0x0009f] in <52bc22bce5254240ba373b3cf23da1ab>:0 
  at Cake.Core.Scripting.ScriptHost.RunTarget (System.String target) [0x0000d] in <1a12afcf649f4de8ab5d15d82d4f6310>:0 
  at Submission#0+<<Initialize>>d__0.MoveNext () [0x00122] in <dba5a7c70e1f4221b4db7847fb712bc6>:0 
  at Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.RunSubmissionsAsync[TResult] (System.Collections.Immutable.ImmutableArray`1[T] precedingExecutors, System.Func`2[T,TResult] currentExecutor, System.Runtime.CompilerServices.StrongBox`1[T] exceptionHolderOpt, System.Func`2[T,TResult] catchExceptionOpt, System.Threading.CancellationToken cancellationToken) [0x00186] in <3ee4bd870c1146d59b98317e4bbdcbe8>:0 
  at Microsoft.CodeAnalysis.Scripting.Script`1[T].RunSubmissionsAsync (Microsoft.CodeAnalysis.Scripting.ScriptExecutionState executionState, System.Collections.Immutable.ImmutableArray`1[T] precedingExecutors, System.Func`2[T,TResult] currentExecutor, System.Func`2[T,TResult] catchExceptionOpt, System.Threading.CancellationToken cancellationToken) [0x000a8] in <3ee4bd870c1146d59b98317e4bbdcbe8>:0 <---

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions