ARM template deployment fails using latest Octopus docker container

(g.bunce) #1

I’m using the latest octopus docker container to deploy an ARM template that appears to work when submitted from Visual Studio.

In Octopus this fails with:

10:59:55   Error    |       Calamari.exe : Error submitting deployment
10:59:55   Error    |       At C:\Octopus\Work\20191002105949-535-7\Bootstrap.ps1:38 char:1
10:59:55   Error    |       + &  "C:\Octopus\OctopusServer\Tools\Calamari.Cloud\6.0.0\Calamari.exe" ...
10:59:55   Error    |       + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10:59:55   Error    |       + CategoryInfo          : NotSpecified: (Error submitting deployment:String) [], RemoteException
10:59:55   Error    |       + FullyQualifiedErrorId : NativeCommandError
10:59:55   Verbose  |       Process C:\Windows\system32\WindowsPowershell\v1.0\PowerShell.exe in C:\Octopus\Work\20191002105949-535-7 exited with code 1
10:59:55   Verbose  |       Updating manifest with output variables
10:59:55   Verbose  |       Updating manifest with action evaluated variables
10:59:55   Fatal    |       The remote script failed with exit code 1

I don’t even know where to start with this as the errors generated are effectively meaningless. I think I have correctly checked:

Variable substitution: The correct parameters are pulled into the Raw logs
Json file location: The JSON arm template files are in the raw logs

When I create the step in the deployment project, there is a message that:

If you are running a PowerShell script as part of this step Windows Management Framework 5 (or newer) must be installed on the Octopus Server .

I have read elsewhere that this is informational and can be ignored (why doesn’t octopus check and not display the message???) and besides, as this is an official docker container image I’d expect it to be correct.

I notice the powershell version in the process path is v1.0… I don’t know if this is correct, but it looks odd. Either way, I wouldn’t know how to fix this in the container (or whether I should as it’s your image).