Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.

You can create a Groovy script file $JENKINS_HOME/init.groovy, or any .groovy file in the directory $JENKINS_HOME/init.groovy.d/, (See See Configuring Jenkins upon start up for more info) to run some additional things right after Jenkins starts up. This script can access classes in Jenkins and all the plugins. So for example, you can write something like:

No Format

import jenkins.model.*Jenkins;

// start in the state that doesn't do any build.