public class GroovyHookScript extends Object
For a given hook name, like "init", the following locations are searched for hook scripts, and then they are executed in turn.
Scripts inside /WEB-INF
is meant for OEM distributions of Jenkins. Files inside
$JENKINS_HOME
are for installation local settings. Use of HOOK.groovy.d
allows configuration management tools to control scripts easily.
Constructor and Description |
---|
GroovyHookScript(String hook)
Deprecated.
|
GroovyHookScript(String hook,
javax.servlet.ServletContext servletContext,
File jenkinsHome,
ClassLoader loader) |
Modifier and Type | Method and Description |
---|---|
GroovyHookScript |
bind(String name,
Object o) |
protected groovy.lang.GroovyShell |
createShell()
Can be used to customize the environment in which the script runs.
|
protected void |
execute(File f) |
protected void |
execute(groovy.lang.GroovyCodeSource s) |
protected void |
execute(URL bundled) |
groovy.lang.Binding |
getBindings() |
void |
run() |
@Deprecated public GroovyHookScript(String hook)
public GroovyHookScript(String hook, @NonNull javax.servlet.ServletContext servletContext, @NonNull File jenkinsHome, @NonNull ClassLoader loader)
public GroovyHookScript bind(String name, Object o)
public groovy.lang.Binding getBindings()
public void run()
protected void execute(URL bundled) throws IOException
IOException
protected void execute(File f)
protected void execute(groovy.lang.GroovyCodeSource s)
protected groovy.lang.GroovyShell createShell()
Copyright © 2004–2021. All rights reserved.