How can I point Jenkins to another jenkins home directory

0 votes
I have the working /.jenkins folder under a specific user in home on Linux. I want to start Jenkins with another user. How can I do this?
Jul 19, 2018 in Jenkins by Nilesh
• 7,060 points
5,004 views

2 answers to this question.

0 votes

I think this can help you out.

Set an Environment Variable JENKINS_HOME pointing to the .jenkinsfolder and run the Jenkins command.

The shell should be like

export JENKINS_HOME=/usr/jhon/.jenkins
java -jar jenkins.war
The batch should be like  

SET JENKINS_HOME=C:\users\jhon\.jenkins
java -jar jenkins.war
answered Jul 19, 2018 by Kalgi
• 2,680 points
0 votes

Here are the options you have:

a) Assuming you're deploying Jenkins into Tomcat,you can do the following:

In your catalina.home/conf/localhost/jenkins.xml

<?xml version="1.0" encoding="UTF-8"?>
<Context docBase="/home/enomad/projects/jenkins/jenkins-master/war/target/jenkins" path="" reloadable="true">
 <Environment name="JENKINS_HOME" value="/home/enomad/projects/jenkins-home"
         type="java.lang.String" override="false"/>
</Context>

b) You can export the JENKINS_HOME=toWhateveryouwant as mentioned by Harsha in the previous post

c) You can extend your JAVA_OPTS params and add -DJENKINS_HOME=/path/to/jenkins_home.

answered Aug 7, 2019 by Sirajul
• 59,230 points

Related Questions In Jenkins

0 votes
3 answers

How can I make Jenkins CI with Git trigger on pushes to master?

To automatically run build on code commit, follow ...READ MORE

answered Aug 7, 2019 in Jenkins by Sirajul
• 59,230 points
4,967 views
0 votes
2 answers

How do i move jenkins from one server to another?

1. Copy all the files in your JENKINS_HOME directory over ...READ MORE

answered Aug 2, 2019 in Jenkins by Sirajul
• 59,230 points
52,746 views
0 votes
1 answer

Jenkins and Docker: How can I customize my jenkins pipeline to use docker?

Jenkins Pipeline is designed to easily use ...READ MORE

answered Aug 26, 2019 in Jenkins by Sirajul
• 59,230 points
1,696 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,034 views
+2 votes
1 answer
0 votes
1 answer

How do I pass value from my Fake # script to the host build server (Jenkins)

You can use the EnvInject plugin to pass environment ...READ MORE

answered Jul 11, 2018 in Jenkins by Kalgi
• 2,680 points
1,362 views
0 votes
1 answer

How Can I measure Jenkins Build Performance?

If you go to the Jenkins page ...READ MORE

answered Jul 16, 2018 in Jenkins by Kalgi
• 2,680 points
2,184 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP