Handling two local instances of Jenkins

Use a separate folder for the second instance of Jenkins.

Temporarily set the $JENKINS_HOME environment variable to secondary Jenkins home directory, using -D (option to temporarily set an environment variable)

You can specify the directory:

-DJENKINS_HOME='C:\Program Files (x86)\Jenkins\secondInstance'

If you’re running a jar file from inside your second instance’s directory, you could just use ‘.’ to specify the current folder as JENKINS_HOME.

java -DJENKINS_HOME=. -jar jenkins.war

Jenkins will start the new instance and load all jobs and system configurations from here.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s