[英]Active choices reactive reference parameter as formatted html in jenkins pipeline with default value
I'm trying to create Active choice HTML parameter with default value in jenkins pipeline and I can't find a problem.我正在尝试在 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\\">"
'''
]
]
]
])
])
It's working fine when I use:当我使用时它工作正常:
return "<input name=\\"value\\" value=\\"\\" class=\\"setting-input\\" type=\\"text\\">"
without a value, but I got empty field then.没有价值,但我得到了空场。 Any ideas?
有任何想法吗?
you are missing entry for referencedParameters: ''
您缺少
referencedParameters: ''
properties([
parameters([
[$class: 'DynamicReferenceParameter',
choiceType: 'ET_FORMATTED_HTML',
omitValueField: true,
referencedParameters: '**ADD value here**',
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\\">"
'''
]
]
]
])
])
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.