Skip to content

Script Console

Type in an arbitrary Groovy script and execute it on the server. Useful for trouble-shooting and diagnostics.

Getting started

Use the ‘println’ command to see the output (if you use System.out, it will go to the server’s stdout, which is harder to see). All the classes from all the plugins are visible. jenkins.*, jenkins.model.*, hudson.*, and hudson.model.* are pre-imported.

println System.getenv("PATH")
println "uname -a".execute().text

This execution happens in the agent JVM.

Console