Hello,
When a Step fails in a Deployment, Octopus.Deployment.Error
and Octopus.Deployment.ErrorDetail
display an error and stack trace (seemingly) related to Octopus Deploy, and not to the failing script.
Octopus.Deployment.Error
(and Octopus.Step[...].Status.Error
) always returns the following:
One or more child activities failed.
Octopus.Deployment.ErrorDetail
(and Octopus.Step[...].Status.ErrorDetail
) always returns the following:
Octopus.Shared.Tasks.ActivityFailedException: One or more child activities failed.
at Octopus.Shared.Tasks.ParallelWorkOrder`1.AssertAllCompletedTasksThusFarAreSuccessful() in y:\work\refs\heads\master\source\Octopus.Shared\Tasks\ParallelWorkOrder.cs:line 78
at Octopus.Shared.Tasks.ParallelWorkOrder`1.Execute() in y:\work\refs\heads\master\source\Octopus.Shared\Tasks\ParallelWorkOrder.cs:line 33
at Octopus.Shared.Tasks.OctoParallel.ForEach[T](IEnumerable`1 workItems, Nullable`1 maxParallelism, Action`1 executeCallback, CancellationToken cancellation) in y:\work\refs\heads\master\source\Octopus.Shared\Tasks\OctoParallel.cs:line 20
at Octopus.Server.Orchestration.Deploy.DeploymentTaskController.DistributeStepAcrossMachines(PlannedStep step) in y:\work\refs\heads\master\source\Octopus.Server\Orchestration\Deploy\DeploymentTaskController.cs:line 174
at Octopus.Server.Orchestration.Deploy.DeploymentTaskController.DispatchStep(PlannedStep step) in y:\work\refs\heads\master\source\Octopus.Server\Orchestration\Deploy\DeploymentTaskController.cs:line 76
My test script is very simple:
Function Work
{
throw "Oops!"
Write-Host "I worked!"
}
Work
These are the Task summary and log (click to view larger):
I was expecting to receive something along the lines of the message in the Task log - maybe there’s a different way to get that:
Oops!
At C:\Octopus\Work\20150806194709-94\Script.ps1:3 char:5
+ throw "Oops!"
+ ~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (Oops!:String) [], RuntimeExce
ption
+ FullyQualifiedErrorId : Oops!
The remote script failed with exit code 1
Any help would be greatly appreciated!
Thanks,
Jesse