Skip to end of metadata
Go to start of metadata

You can create a Groovy script file $JENKINS_HOME/init.groovy, or any .groovy file in the directory $JENKINS_HOME/init.groovy.d/, (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:

import jenkins.model.Jenkins;

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

Output is logged to the Jenkins log file. For Debian based users, this is /var/log/jenkins/jenkins.log

  • No labels