The Extended Choice Parameter plugin is great and I use it in jobs configured via the UI https://wiki.jenkins-ci.org/display/JENKINS/Extended+Choice+Parameter+plugin
How
Like mkobit said it is currently not possible to use the extended choice plugin as a build parameter.
What I like to use as a workaround is a construct like the following
timeout(time: 5, unit: TimeUnit.MINUTES) {
def result = input(message: 'Set some values', parameters: [
booleanParam(defaultValue: true, description: '', name: 'SomeBoolean'),
choice(choices: "Choice One\nChoice Two", description: '', name: 'SomeChoice'),
stringParam(defaultValue: "Text", description: '', name: 'SomeText')
]) as Map
}
echo "${result.SomeBoolean}, ${result.SomeChoice}, ${result.SomeText}"
And call it in the beginning of my pipeline. You then get asked for these inputs shortly after your build starts.