2.0 Pipeline - input step with choice param fails

2,104 views
Skip to first unread message

Lionel Orellana

unread,
May 1, 2016, 10:21:35 AM5/1/16
to Jenkins Users
Hello

I got this code from the snippet generator to capture user input with a Choice Parameter:

input message: 'where do you want to build this?', parameters: [[$class: 'ChoiceParameterDefinition', choices: ['ec2', 'docker'], description: '', name: 'label']]

When I add it to my pipeline it throws

java.lang.ClassCastException: hudson.model.ChoiceParameterDefinition.choices expects class java.lang.String but received class java.util.ArrayList

ChoiceParameterDefinition does seem to have a constructor that takes a string[] for choices. 

Any ideas?

thanks

Lionel.

Antonio Muñiz

unread,
May 4, 2016, 4:44:15 AM5/4/16
to jenkins...@googlegroups.com

On Sun, May 1, 2016 at 4:21 PM, Lionel Orellana <lion...@gmail.com> wrote:
Any ideas?

Filed https://issues.jenkins-ci.org/browse/JENKINS-34590 (there is a workaround in a comment).


--
Antonio Muñiz
Software Engineer
CloudBees, Inc.

Lionel Orellana

unread,
May 4, 2016, 8:15:34 AM5/4/16
to jenkins...@googlegroups.com
Cool. Gracias.

--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/IM9HmP3PMf8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJc7kzSUM4mnnyK1jauz6kaVzUY1CW21LktxTobJxcEh%3D3i8LA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages