I have a template with a few string parameters and parameter-value saving is fine…until I add a parameter of type array. Once this parameter is added, I’m no longer able to save parameters via the GUI.
example template
{
"$schema": “http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#”,
“contentVersion”: “1.0.0.0”,
“parameters”: {
“this”: { “type”: “string” },
“that”: { “type”: “string” },
“other”: { “type”: “string” },
“problem”: { “type”: “array” }
},
“variables”: {
},
“resources”: [
],
“outputs”: {
}
}
Hi,
Thanks for getting in touch.
Can you please confirm which version of Octopus you are using? We had an issue with array parameters that was fixed recently in version 3.4.11.
And can you please confirm how you are adding array parameters via the UI?
For example, using your template I was able to save int and string arrays successfully, as follows:
Eg.
[1,2,3]
or
["Test1", "Test2"]
Hope this helps
Cheers
Mark
Hi Mark, thanks for the reply.
A bit more description on replay steps
(1) Create a new project and a process step, chosing resource group
(2) Paste the demo template
(3) Enter a value for the first three string parameters
(4) Don’t enter a 4th parameter for the array parameter
(5) Save the step
(6) Go back and look at the step and the parameter values will be gone (at least mine are)
Also, I’m using Octopus in the azure marketplace, created about a week ago. I’m not sure what version but I see a wally waver encouraging me to upgrade to 3.4.12
Hi,
To determine which version you are running, once you’re logged into Octopus, please click the question mark icon in the top right corner. If this is below version 3.4.11, then you will need to upgrade before array parameters will work correctly.
If you wish to enter an empty array for your 4th array parameter, you will need to enter an empty array. Eg. []
(do not leave the field blank).
Does this help fix the issue you are seeing?
Cheers
Mark
Thank you for the guidance. Im using version 3.4.11 in the Azure Marketplace.
Your guidance does solve the issue, however, I don’t think Octopus should require that a value be present in this array parameter in order to save values for other parameters. I note that if I delete the array parameter, then I am free to specify, or leave blank, the values for the remaining string parameters.
Please feel free to close this incident. You may consider this thread a bug or feature request as you see fit.
Hi,
I’m glad we found a workaround.
Regarding the issue, we agree and have created a GitHub issue here if you wish to be notified when this is fixed.
Cheers
Mark