Home
Some useful commands you can run from the Jenkins script console.
println "Running plugin enumerator"
println ""
def plugins = jenkins.model.Jenkins.instance.getPluginManager().getPlugins()
plugins.each {println "${it.getShortName()}:${it.getVersion()}"}
println ""
Source: http://stackoverflow.com/a/9822818
println new ProcessBuilder('sh','-c','ls').redirectErrorStream(true).start().text
Source: http://jenkins-ci.361315.n4.nabble.com/shell-commands-scripts-in-Script-Console-td2717925.html