...
value: prdapi01, prdapi02
DEPLOY_SERVER_NAME
case: prdapi01
value: prdapi01, prdapi02
DEPLOY_SERVER_NAME
case: prdapi01
value: 배포할 IP:PORT 혹은 URL
case: prdapi02
value: 배포할 IP:PORT 혹은 URL
Code Block properties([ parameters([ [ $class: 'ExtendedChoiceParameterDefinition', type: 'PT_MULTI_SELECT', name: 'DEPLOY_SERVER_NAME', value: 'prdapi01,prdapi02', defaultValue: 'prdapi01', description: '배포할 서버', visibleItemCount: '1' ], [ $class: 'DynamicReferenceParameter', choiceType: 'ET_FORMATTED_HTML', referencedParameters: 'DEPLOY_SERVER_NAME', name: 'SERVER_URL', description: '배포할 서버 Backend URL(스키마 로드)', omitValueField: true, script: [ $class: 'GroovyScript', script: [ classpath: [], sandbox: false, script: ''' switch(DEPLOY_SERVER_NAME){ case~/.*prdapi01.*/: return """<input name="value" value="httphttps://api.justten.io{prdapi01IP}:{port}" class="setting-input" type="text">""" break case~/.*prdapi02.*/: return """<input name="value" value="httphttps://api.justten.io{prdapi02IP}:{port}" class="setting-input" type="text">""" break default: return "" break } ''' ], fallbackScript: [ classpath: [], sandbox: false, script: "return ''" ], ] ] ]) ])
...