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/9c6cec1e-0848-46a0-b754-9a0241c67d76%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.