Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins git location

Tags:

git

jenkins

I'm trying to find the directory where jenkins stores the git repository, I need to be able to setup the AWS dev tools so I can run the shell command to aws.push up to beanstalk. For some reason the directory with the working files appears to have incorrect branch info associated with it.

[email protected]:~/jobs/myPHPapp/workspace$ git status
# Not currently on any branch.
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#   default/

The branch jenkins imports from github is my 'dev' branch, weird that it only shows master. Does Jenkins save another copy of the repository elsewhere?

like image 357
greg Avatar asked Jul 18 '12 23:07

greg


People also ask

Where is my Git repository located?

The default location that Git Bash starts in is typically the home directory (~) or /c/users/<Windows-user-account>/ on Windows OS. To determine the current directory, type pwd at the $ prompt. Change directory (cd) into the folder that you created for hosting the repository locally.

Where does Jenkins clone the Git repo?

After adding a new git repository (project configuration > Source Code Management > check the GIT option ) to the project navigate to the bottom of the plugin settings, just above Repository browser region.

How do I access Git in Jenkins?

http://localhost:8080/jenkins/restart Then enter a name for a job, in the following case, the name entered is 'Demo'. Select 'Freestyle project' as the item type. Click the Ok button. In the next screen, if you browse to the Source code Management section, you will now see 'Git' as an option.

What is Jenkins path to Git executable?

3 version, Go to Manage jenkins -> Global tool configuration -> Git installations -> Path to Git executable: C:\Program Files\Git\bin\git.exe It works!


1 Answers

You've got that right, Jenkins clones git repository to the job workspace in ${JENKINS_HOME}/jobs/<JOB_NAME>/workspace

You should try clearing the workspace and then starting another build. If that helps you can set up Jenkins to automatically clear the workspace after the build is done. If that doesn't help, you have to carefully inspect the console output that this job generates and maybe post it if you need further assistance.

like image 105
Marcin Koziński Avatar answered Sep 18 '22 23:09

Marcin Koziński