Class GroovyScript

java.lang.Object
jenkins.security.MasterToSlaveCallable<Object,RuntimeException>
org.jenkinsci.plugins.scriptler.util.GroovyScript
All Implemented Interfaces:
hudson.remoting.Callable<Object,RuntimeException>, Serializable, org.jenkinsci.remoting.RoleSensitive
Direct Known Subclasses:
ControllerGroovyScript

public class GroovyScript extends MasterToSlaveCallable<Object,RuntimeException>
Inspired by hudson.util.RemotingDiagnostics.Script, but adding parameters.
See Also:
  • Constructor Details

    • GroovyScript

      public GroovyScript(String script, @NonNull Collection<Parameter> parameters, boolean failWithException, TaskListener listener)
      Constructor
      Parameters:
      script - the script to be executed
      parameters - the parameters to be passed to the script
      failWithException - should the job fail with an exception
      listener - access to logging via listener
  • Method Details

    • getClassLoader

      public ClassLoader getClassLoader()
    • call

      public Object call()
    • setShellVariables

      protected void setShellVariables(@NonNull groovy.lang.GroovyShell shell)