Running powershell script from nuget package failes

Today we have updated octopus service from 2018.3.6 to 2018.3.11 and Now we stuck with problem:
When we deploy project with step ‘Run a script’, catch the error:

E:\Program Files\Octopus\Tentacle\Work\20180409145706-138693-4150\OfxSite.ps1  
: A parameter cannot be found that matches parameter name 'substituteVariables'. 

I added Octopus.Action.PowerShell.DebugMode = true to project variables and saw this strange options

Deployment process does not have any options/parameters for script:

....
"Actions": [
        {
          "Id": "7f10bf9f-7141-440a-80f6-0f31c1c89c89",
          "Name": "Our cool step name",
          "ActionType": "Octopus.Script",
          "IsDisabled": false,
          "CanBeUsedForProjectVersioning": true,
          "Environments": [],
          "ExcludedEnvironments": [],
          "Channels": [],
          "TenantTags": [],
          "Properties": {
            "Octopus.Action.Script.ScriptSource": "Package",
            "Octopus.Action.Package.PackageId": "Our.Cool.Package.Name",
            "Octopus.Action.RunOnServer": "false",
            "Octopus.Action.Package.FeedId": "#{Nuget.Mfm}",
            "Octopus.Action.Script.ScriptFileName": "OfxSite.ps1"
          },
          "Links": {}
        }
      ]
...

I think that this parameter pushed by Calamari https://github.com/OctopusDeploy/Calamari/blob/master/source/Calamari/Commands/RunScriptCommand.cs#L43

Hi Andrei,

Nice detective work.

This is a bug, I have raised a GitHub issue that you can track and contribute to: https://github.com/OctopusDeploy/Issues/issues/4462

You may be able to work around this issue adding a variable calledOctopus.Action.UseNewExecutionDispatcher with a value of false.

Cheers,
Shane

Hi Andrei,

In the process of shipping a fix for this, it should be fixed in 2018.3.12. Please let me know if it resolves the issue for you.

Cheers,
Shane.

Thanks.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.