Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is the Jenkins working directory located?

Situation: I installed Jenkins on my vserver and setup a "freestyle pipeline". I connected it via webhook push to my github which works (when I push to the repository, a new build job is started in jenkins).

Problem: I can't seem to find the working directory where the git pull is executed in. I already searched for answers and many people say $JENKINS_HOME, but echo $JENKINS_HOMEreturns a blank line for me. Did I do anything wrong or where is my project then? Also, can I set the path to where the repository is pulled to a custom path (say /root/myprojectname)?

EDIT: I can see the workspace in Jenkins webuserinterface but I can't find the corresponding folder on the vservers drive.

like image 444
divby0 Avatar asked Oct 29 '25 12:10

divby0


1 Answers

Did you check in /var/lib/jenkins. By default the jenkins home directory lies there as well in case of linux servers. It should also show you the home directory by browsing Manage Jenkins--> Configure System

like image 91
Mayank Gokarna Avatar answered Nov 01 '25 14:11

Mayank Gokarna



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!