How jenkinsci/groovy-plugin works
The Jenkins Groovy plugin offers three execution routes: freestyle Groovy builds, privileged in-process System Groovy builds, and a Pipeline withGroovy step. Freestyle scripts come from workspace files or configured text and run through the Groovy command; System Groovy evaluates secure scripts inside Jenkins with build bindings. Administrators configure Groovy installations, and the plugin also documents optional token-macro evaluation. The graph preserves these distinct routes and source types. Edges are limited to relationships shown in the README or sampled source; unsampled behavior is not inferred.
Main entry points: Groovy.java Groovy builder · SystemGroovy.java System Groovy builder · ScriptSource.java Script source API · WithGroovyStep.java withGroovy step
Components 17
Freestyle execution
- Groovy builder
src/main/java/hudson/plugins/groovy/Groovy.java - Builder base
src/main/java/hudson/plugins/groovy/AbstractGroovy.java - Script source API
src/main/java/hudson/plugins/groovy/ScriptSource.java - Inline script source
src/main/java/hudson/plugins/groovy/StringScriptSource.java - Workspace file source
src/main/java/hudson/plugins/groovy/FileScriptSource.java
System Groovy
- System Groovy builder
src/main/java/hudson/plugins/groovy/SystemGroovy.java - System source API
src/main/java/hudson/plugins/groovy/SystemScriptSource.java - Secure inline source
src/main/java/hudson/plugins/groovy/StringSystemScriptSource.java - Secure file source
src/main/java/hudson/plugins/groovy/FileSystemScriptSource.java
Pipeline integration
- withGroovy step
src/main/java/hudson/plugins/groovy/WithGroovyStep.java - Pipeline script resource
src/main/resources/hudson/plugins/groovy/Pipeline.groovy
Tools and extensions
- Groovy installation
src/main/java/hudson/plugins/groovy/GroovyInstallation.java - Groovy installer
src/main/java/hudson/plugins/groovy/GroovyInstaller.java - Token macro extension
src/main/java/hudson/plugins/groovy/GroovyTokenMacro.java
Other components
- Jenkins user
- Groovy command
- Jenkins runtime
Connections 18
- Jenkins user → Groovy builder: configures build
README.md - Groovy builder → Script source API: loads script
src/main/java/hudson/plugins/groovy/Groovy.java - Groovy builder → Groovy installation: selects tool
src/main/java/hudson/plugins/groovy/Groovy.java - Groovy builder → Groovy command: launches script
README.md - Builder base → Script source API: exposes source options
src/main/java/hudson/plugins/groovy/AbstractGroovy.java - Inline script source → Script source API: implements source
src/main/java/hudson/plugins/groovy/StringScriptSource.java - Workspace file source → Script source API: implements source
src/main/java/hudson/plugins/groovy/FileScriptSource.java - System Groovy builder → System source API: gets secure script
src/main/java/hudson/plugins/groovy/SystemGroovy.java - System Groovy builder → Jenkins runtime: evaluates script
src/main/java/hudson/plugins/groovy/SystemGroovy.java - Secure inline source → System source API: implements source
src/main/java/hudson/plugins/groovy/StringSystemScriptSource.java - Secure file source → System source API: implements source
src/main/java/hudson/plugins/groovy/FileSystemScriptSource.java - Jenkins user → System Groovy builder: configures build
README.md - Jenkins user → withGroovy step: uses pipeline step
README.md - withGroovy step → Groovy installation: resolves tool
src/main/java/hudson/plugins/groovy/WithGroovyStep.java - withGroovy step → Pipeline script resource: copies resource
src/main/java/hudson/plugins/groovy/WithGroovyStep.java - Groovy installation → Groovy installer: offers installer
src/main/java/hudson/plugins/groovy/GroovyInstallation.java - Jenkins user → Token macro extension: enables integration
README.md - Token macro extension → System Groovy builder: evaluates as system script
README.md