'Jenkins CascadeChoiceParameter not rendering from Jenkinsfile
The following CascaseChoiceParamater code in a Jenkinsfile does not render a reactive parameter. Same code renders fine using a Jenkins pipeline script. (where it was successfully tested). Any ideas?
[$class: 'CascadeChoiceParameter', name: 'TARGET_HOST', choiceType: 'PT_SINGLE_SELECT', description: 'Target Server', filterLength: 1, filterable: false, randomName: 'choice-parameter-38222740232420', referencedParameters: 'ENV', script: [ $class: 'GroovyScript', fallbackScript: [ classpath: [], sandbox: false, script: "return['Nothing']" ], script: [ classpath: [], sandbox: false, script: '''if (ENV.equals("PROD")) { return ["RXBK1","RXBK2","ALL"] } else if (ENV.equals("UAT")) { return ["RXDV1","RXBK1UAT","RXBK2UAT","ALL"] } else if (ENV.equals("QA")) { return ["RXDV1","RXBK1QA","RXBK2QA","ALL"] } else if (ENV.equals("DEV")) {return ["RXDV1"] } ''' ] ] ],
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
