Skip to content

Instantly share code, notes, and snippets.

@menvol3
Created January 5, 2022 18:30
Show Gist options
  • Save menvol3/d8b69297c986e49b19c8565c5dd8c74d to your computer and use it in GitHub Desktop.
Save menvol3/d8b69297c986e49b19c8565c5dd8c74d to your computer and use it in GitHub Desktop.
[$class : 'DynamicReferenceParameter',
choiceType : 'ET_FORMATTED_HTML',
name : 'ExtraArgs',
referencedParameters: 'Type',
script : [
$class : 'GroovyScript',
fallbackScript: [
classpath: [],
sandbox : false,
script : 'return ["Received an error during configuring extra args input box"]'
],
script : [
classpath: [],
sandbox : false,
script :
"""
if (Type.startsWith("foo")) {
return """<input name='version' type='text' placeholder='Version to install'> <br> <br>
<input name='token' type='text' style='width: 350px;' placeholder='Authorization token'> <br> <br>
<input name='bool' type='text' style='width: 350px;' placeholder='true/false'>"""
}
"""
]
]
]
])
])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment