-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
Jenkins 2.277.4
A multibranch Pipeline with Jenkins pipeline script.
After Running build and opening Build With parameters page, the bellow falls to fallbackScript
this is my code:
(one note, if I add via Jenkins UI (Configure-> Add parameter -> Active Choice sReactive Reference Parameter -> put script there, it works fine. but not from pipeline script.)
stage ('Parameters'){ steps { script { properties([ parameters([ [$class: 'DynamicReferenceParameter', choiceType: 'ET_FORMATTED_HTML', name: 'TYPE', script: [ $class: 'GroovyScript', fallbackScript: [ classpath: [], sandbox: false, script: ''' return """ <p>FallbackScript. Error in main script</p> """ ''' ], script: [ classpath: [], sandbox: false, script: ''' return """ <head> <script> function foo(val){ alert(val.value); } </script> </head> <select onchange='foo(this);'> <option value='X'>X</option> <option value='Y'>Y</option> </select> """ ''' ] ] ]) ]) } } } ....