The error message is unfortunately irrelevant here. It is part of the logger info that fires at some point before the parameter is defined. The real issue is that you are expected to return a list or map from the groovy script of an Actice Choice Reactive parameter, and not text as you are currently doing.
Other than that it looks good On Monday, March 13, 2017 at 7:59:21 PM UTC-4, [email protected] wrote: > > Hi, > > I'm trying to use Active Choices plugin to get branch list by repo using > github api, but it gives me an error that there is no repo - which is a > referenced parameter, which is already defined. > > In case, I'm using Ubuntu 16.0.4, Jenkins 2.32.2 and Active choices plugin > 1.5.3. > > if (REPO.equals("REPOA")){ > def proc = "curl > https://api.github.com/repos/jenkinsci/active-choices-plugin/branches | > jq -r '[.[] | .name ]'".execute() > return proc.text > } > else if (REPO.equals("REPOB")){ > def proc = "curl > https://api.github.com/repos/jenkinsci/active-choices-plugin/branches | > jq -r '[.[] | .name ]' ".execute() > return proc.text > } > > > > > Am I doing something wrong? > > (I also tried to use buffer/stream way since I found some answers about > not using 'text' from stackoverflow, but same result. the code part to get > branch name is working fine on scriptler edit mode.) > > def proc ="curl...." > def outputStream = new StringBuffer() > proc.waitForProcessOutput(outputStream, System.err) > return outputStream.toString()) > referenced parameter reactive part > > > > The error is as follow: > > Fallback to default script... > groovy.lang.MissingPropertyException: No such property: REPO for class: > Script1 > at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap( > ScriptBytecodeAdapter.java:53) > at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty( > PogoGetPropertySite.java:52) > at org.codehaus.groovy.runtime.callsite.AbstractCallSite. > callGroovyObjectGetProperty(AbstractCallSite.java:307) > at Script1.run(Script1.groovy:1) > > > > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/205e3b2a-089c-41de-811c-dd472f0daa7b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
