Snippet generator generates an array:
input id: 'Cc2a7d4d888ad098e3ca0ed7599d887d', message: 'Which environment?', ok: 'Submit', parameters: [[$class: 'ChoiceParameterDefinition', choices: ['Red', 'Blue', 'Green'], description: '', name: 'env']]
ChoiceParameterDefinition requires a delimited string.
Workaround by modifying the snippet code by converting array to string with "\n" separator, e.g.:
input id: 'Cc2a7d4d888ad098e3ca0ed7599d887d', message: 'Which environment?', ok: 'Submit', parameters: [[$class: 'ChoiceParameterDefinition', choices: 'Red\nBlue\nGreen', description: '', name: 'env']]
Or just join the Array elements:
input id: 'Cc2a7d4d888ad098e3ca0ed7599d887d', message: 'Which environment?', ok: 'Submit', parameters: [[$class: 'ChoiceParameterDefinition', choices: ['Red', 'Blue', 'Green'].join('\n'), description: '', name: 'env']]
- causes
-
JENKINS-63015 IllegalArgumentException for ChoiceParameter on bindJSON saving job configuration
- Closed
- depends on
-
JENKINS-27901 Standard form control for string collections
- Open
- is duplicated by
-
JENKINS-34590 Fail to generate correct input step with choice param syntax from snippet generator
- Resolved
-
JENKINS-38995 Choice parameters cannot be used inside of Multibranch Pipelines
- Resolved
-
JENKINS-33271 Snippet generator creates wrong input statement with ChoiceParameter
- Closed
- is related to
-
JENKINS-41180 "choice" parameter should take array for choices argument
- Closed
-
JENKINS-38913 DSL for choiceParam not working
- Open
-
JENKINS-26619 DescribableHelper does not handle GitSCMExtension
- Resolved
- relates to
-
JENKINS-53917 choice parameter no longer supports choices in pipeline
- Resolved
-
JENKINS-40358 Snippet editor: Invalid code for "choice" parameter/properties
- Resolved
-
JENKINS-63015 IllegalArgumentException for ChoiceParameter on bindJSON saving job configuration
- Closed
-
JENKINS-41180 "choice" parameter should take array for choices argument
- Closed
-
JENKINS-44892 Ability to override reflective metadata in DescribableModel
- Resolved
- links to