Closed aadamovich closed 10 years ago
Hmmm...it looks like for some reason the response object coming back from the REST call is null - let me see if I can reproduce and I'll get it fixed.
Looks like the Jenkins createItem API is no longer returning a Content-Type header. Not sure if this is related to the Jetty upgrade or is coincidental. In any event, this is giving the RESTClient API fits because it wants to use it to determine what parser to use to parse the response. The combination of 1) no content-type header and 2) no content causes it to just return a null response (which is lovely behavior). I've implemented a workaround that I believe will handle all reasonable scenarios (it at least works for the success and failure scenarios I tested).
I've pushed the fix to master. I'll cut a 0.3.4 release and push it to maven central in the morning.
Thanks a lot. This was quick :)
v0.3.4 has been pushed to maven central. Should be available some time in the next hour or two.
The plugin worked fine until today. With Jenkins 1.535, I started getting exception when creating new job:
Caused by: java.lang.NullPointerException: Cannot get property 'success' on null object at org.codehaus.groovy.runtime.NullObject.getProperty(NullObject.java:56) at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:156) at org.codehaus.groovy.runtime.callsite.NullCallSite.getProperty(NullCallSite.java:44) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:227) at com.terrafolio.gradle.plugins.jenkins.JenkinsRESTServiceImpl.createJob(JenkinsRESTServiceImpl.groovy:111) at com.terrafolio.gradle.plugins.jenkins.JenkinsService$createJob.call(Unknown Source)
Is it Jenkins API change?