If I use File parameter in declarative way, it gives the exception below.
But the same command works fine in freestyle job.
Is there any way to upload file of any format (xls, properties) into Jenkins workspace using declarative way, if not File parameter?
java.lang.NullPointerException
at hudson.model.FileParameterValue.doDynamic(FileParameterValue.java:205)
at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:184)
at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:117)
at org.kohsuke.stapler.MetaClass$11.dispatch(MetaClass.java:397)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
Caused by: javax.servlet.ServletException