New Reply

Good news! We have migrated all the Q&A on this site to https://forums.inedo.com, and are currently monitoring questions there!

Here are some important links:

All posts here are permanently locked (and will be redirected soon), and if you have any issues with the new site, please submit a support ticket, use the contact form, or visit our Slack Workspace.

In the powershell code shown below, the value for param3 is not received from the plan when the release is executed. Is this a powershell limitation, or something to do with how BuildMaster is parsing the script? If I remove $arr_param, param3 is properly handled.

When the plan is viewed in visual mode, param3 doesn't show up when I edit the test_PS_script Operation. Including a value for arr_param in the plan doesn't change the behavior (although the script does receive the passed in value for arr_param).

SCRIPTASSET - test_PS_script

Param (
$param1,
$param2,
$arr_param = @(),
$param3
)

Write-Output "param1: ${param1}"
Write-Output "param2: ${param2}"
Write-Output "arr_param.Count: $($arr_param.count)"
Write-Output "param3: ${param3}"

PLAN

PSCall test_PS_script
(
    param1: val1,
    param2: val2,
    param3: val3
);

OUTPUT

Found script test_PS_script.ps1 in Default raft.
Using LocalAgent agent on TESTSERVER01
Importing param3...
Assigning parameter param1...
Assigning parameter param2...
param1: val1
param2: val2
arr_param.Count: 0
param3:

After looking into this issue further we have determined that sequentially ordering the parameters will resolve the issue.

Thanks,
Jason