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,ControllerToAgentCallable<Object,,RuntimeException> org.jenkinsci.remoting.RoleSensitive
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionControllerGroovyScript(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 voidsetShellVariables(groovy.lang.GroovyShell shell) Methods inherited from class org.jenkinsci.plugins.scriptler.util.GroovyScript
callMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface hudson.remoting.Callable
getChannelOrFail, getOpenChannelOrFailMethods inherited from interface jenkins.agents.ControllerToAgentCallable
checkRoles
-
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:
getClassLoaderin classGroovyScript
-
setShellVariables
protected void setShellVariables(@NonNull groovy.lang.GroovyShell shell) - Overrides:
setShellVariablesin classGroovyScript
-