Class GroovyShellDecorator
java.lang.Object
org.jenkinsci.plugins.workflow.cps.GroovyShellDecorator
- All Implemented Interfaces:
ExtensionPoint
Hook to customize the behaviour of
GroovyShell
used to run workflow scripts.- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final GroovyShellDecoratorGroovyShellDecoratorthat doesn't do anything. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ExtensionList<GroovyShellDecorator> all()voidconfigureCompiler(CpsFlowExecution context, org.codehaus.groovy.control.CompilerConfiguration cc) Called withCompilerConfigurationto provide opportunity to tweak the runtime environment further.voidconfigureShell(CpsFlowExecution context, groovy.lang.GroovyShell shell) Called with a configuredGroovyShellto further tweak its behaviours.voidcustomizeImports(CpsFlowExecution context, org.codehaus.groovy.control.customizers.ImportCustomizer ic) Called withImportCustomizerto auto-import more packages, etc.Obtains a contextualizedGroovyShellDecoratorused to decorate the trusted shell.
-
Field Details
-
NULL
GroovyShellDecoratorthat doesn't do anything.
-
-
Constructor Details
-
GroovyShellDecorator
public GroovyShellDecorator()
-
-
Method Details
-
customizeImports
public void customizeImports(@CheckForNull CpsFlowExecution context, org.codehaus.groovy.control.customizers.ImportCustomizer ic) Called withImportCustomizerto auto-import more packages, etc.- Parameters:
context- null ifGroovyShellis created just to test the parsing of the script.
-
configureCompiler
public void configureCompiler(@CheckForNull CpsFlowExecution context, org.codehaus.groovy.control.CompilerConfiguration cc) Called withCompilerConfigurationto provide opportunity to tweak the runtime environment further.- Parameters:
context- null ifGroovyShellis created just to test the parsing of the script.
-
configureShell
Called with a configuredGroovyShellto further tweak its behaviours.- Parameters:
context- null ifGroovyShellis created just to test the parsing of the script.
-
forTrusted
Obtains a contextualizedGroovyShellDecoratorused to decorate the trusted shell.By default, this method returns null decorator that doesn't do anything.
See
classloader.mdfor details. -
all
-