我正在尝试在jenkins管道中创建具有默认值的Active choice HTML参数,但找不到问题。
properties([
parameters([
[$class: 'DynamicReferenceParameter',
choiceType: 'ET_FORMATTED_HTML',
omitValueField: true,
referencedParameters: '',
description: 'Test',
name: 'TEST',
randomName: 'choice-parameter-46431548642',
script: [
$class: 'GroovyScript',
fallbackScript: [
classpath: [],
sandbox: true,
script:
'return[\'Could not get any info\']'
],
script: [
classpath: [],
sandbox: false,
script:
'''
return "<input name=\\"value\\" value=\\"Test\\" class=\\"setting-input\\" type=\\"text\\">"
'''
]
]
]
])
])
使用时效果很好:
return "<input name=\\"value\\" value=\\"\\" class=\\"setting-input\\" type=\\"text\\">"
没有值,但是我得到了空字段。 有什么想法吗?