Class ControllerGroovyScript
java.lang.Object
jenkins.security.MasterToSlaveCallable<Object,RuntimeException>
org.jenkinsci.plugins.scriptler.util.GroovyScript
org.jenkinsci.plugins.scriptler.util.ControllerGroovyScript
- All Implemented Interfaces:
hudson.remoting.Callable<Object,
,RuntimeException> Serializable
,org.jenkinsci.remoting.RoleSensitive
- See Also:
-
Constructor Summary
ConstructorDescriptionControllerGroovyScript
(String script, Collection<Parameter> parameters, boolean failWithException, TaskListener listener, Launcher launcher, AbstractBuild<?, ?> build) This constructor can only be used when the script is executed on the built-in node, because launcher and build can not be transferred to an agent and therefore the execution will fail -
Method Summary
Modifier and TypeMethodDescriptionprotected void
setShellVariables
(groovy.lang.GroovyShell shell) Methods inherited from class org.jenkinsci.plugins.scriptler.util.GroovyScript
call
Methods inherited from class jenkins.security.MasterToSlaveCallable
checkRoles
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface hudson.remoting.Callable
getChannelOrFail, getOpenChannelOrFail
-
Constructor Details
-
ControllerGroovyScript
public ControllerGroovyScript(String script, @NonNull Collection<Parameter> parameters, boolean failWithException, TaskListener listener, Launcher launcher, AbstractBuild<?, ?> build) This constructor can only be used when the script is executed on the built-in node, because launcher and build can not be transferred to an agent and therefore the execution will fail- Parameters:
script
- the script to be executedparameters
- the parameters to be passed to the scriptfailWithException
- should the job fail with an exceptionlistener
- access to logging via listenerlauncher
- the launcherbuild
- the current build
-
-
Method Details
-
getClassLoader
- Overrides:
getClassLoader
in classGroovyScript
-
setShellVariables
protected void setShellVariables(@NonNull groovy.lang.GroovyShell shell) - Overrides:
setShellVariables
in classGroovyScript
-