On Fri, Mar 28, 2014 at 7:03 PM, Bruno P. Kinoshita
<[email protected]> wrote:
> https://github.com/Seitenbau/sb-jenkins-dynamicparameter/pull/28

I noted several mistakes in the usage of the various ScriptApproval
methods. I wonder if I need to make an easier-to-use wrapper object
for GroovyLanguage, basically a Describable containing a script and a
sandbox flag, which would have a stock config.jelly (including
help-sandbox.html and a doCheckScript method), and a constructor and
some other methods that calls the right things at the right times. The
downside is that this would not be serialization-compatible with
current describable classes which have a direct script field; they
would need to have a readResolve method that converts the inline
script into this wrapper. I will think about it though.

> feel free to massage the text as needed

I did.

> I added a custom Runnable to store the result of the
> script execution, since the plug-in uses it to create the dynamic parameters
> (or was there an easier way?)

An overload taking Callable could be added as a convenience. (You can
use an inline Runnable class and an AtomicReference for more concise
code using the current API, BTW.)

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to