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?
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.
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.
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.
3 version, Go to Manage jenkins -> Global tool configuration -> Git installations -> Path to Git executable: C:\Program Files\Git\bin\git.exe It works!
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With