Child pages
  • Jenkins Script Console
42 more child pages

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: update learning and example scripts sections


Example Groovy scripts

titleOut of date scripts

Due to the nature of Groovy scripts accessing Jenkins source code directly, Script Console scripts are easily out of date from the Jenkins source code. It is possible to run a script and get exceptions because public methods and interfaces in Jenkins core or Jenkins plugins have changed. Keep this in mind when trying out examples. Jenkins is easily started from a local development machine via the following command:

Code Block
titleStarting a local copy of Jenkins
export JENKINS_HOME="./my_jenkins_home"
java -jar jenkins.war

Use CTRL+C to stop Jenkins. It is not recommended to try Script Console examples in a production Jenkins instance.


Browse all Scriptler Plugin Groovy Scripts and please share your scripts with the Scriptler Plugin.

Children Display

Some scripts at

Write Groovy scripts for Jenkins with Code completion - The gist of this is to create a Maven project within your IDE and to depend on org.jenkins-ci.main:jenkins-core (and any other plugins that you expect present). You can then write a Groovy script with code completion of Jenkins API objects and methods.

Plugins enabling Groovy usage