I'm trying to use the CascadeChoiceParameter to dynamically mount my parameters form, using commands to create my list of options:
choiceType: 'PT_SINGLE_SELECT',
description: 'Informations about the application on kubernetes',
name: 'deployments',
omitValueField: false,
randomName: 'choice-parameter-5633384460832175',
referencedParameters: 'namespaces',
script: [
$class: 'GroovyScript',
script: [
classpath: [],
sandbox: true,
script: """
if (namespaces.equals("Select")){
return["Nothing to do - Select your deployment"]
} else {
def kubecmd = "kubectl get deploy --kubeconfig=${kubefileHlg} -o jsonpath={.items[*].metadata.name} -n " + namespaces
return [kubecmd.execute().in.text.split()]
}
"""
]
The form parameter on Jenkins shows me this - a single option with all values comma separated:

Do you have any idea how can I mount these options as a real list on it?
