I am using opensource Jenkins 2.235.3 version on Centos 7.7 machine with Active Choices Plug-in Version 2.4
The problem I am running into is very strange
I am using a groovy script to dynamically populate parameters and I am using Active Choices Reactive Parameter. In that plugin I have written a following groovy script
Groovy Code:
this.class.classLoader.addURL(new URL("file:///var/lib/jenkins/.groovy/grapes/org.yaml/snakeyaml/jars/snakeyaml-1.17.jar"))
def url = 'git@xxx.xxx.com:csd/deployment.git'
def envlist = ['/bin/bash', '-c', ' ssh-add /var/lib/jenkins/.ssh/id_rsa_git; cd /var/lib/jenkins/services/; git archive --remote='+ url +' master inventory | tar xvf -' ].execute().
envlist.waitFor()
def yaml = Class.forName("org.yaml.snakeyaml.Yaml").newInstance()
def config = yaml.load(new FileReader("/var/lib/jenkins/services/inventory/${SERVICES}.yml"))
return config.all.children."${SERVICES}".children.keySet()
NOTE: SERVICES is another defined parameter
Whereas when I use Active choice reactive reference parameter with same code:
Same groovy code works and prints out the following result
"[functional, staging_stable, pilot_stable, prod_stable]"
When I use script console in manage jenkins, it runs fine and prints me the same result Result:
[functional, staging_stable, pilot_stable, prod_stable]
When I check web console logs, I get
"Calling Java server code to update HTML elements... unochoice.js:154:17
Values returned from server: [[],[]] unochoice.js:157:21
How can I proceed with debugging, I want to only use Active Choices Reactive Parameter? I have attached the screenshot to show how one is populated and one is not. Not enough to go through and debug this problem over the internet. Can somebody please help?