Jenkins is not properly cloning git code in freestyle Jobs - jenkins

In Jenkins, I have multiple freestyle jobs. In these jobs I am cloning the code from git. As shown below picture:
source code management
But sometimes the code doesn't want to be properly cloned from the repository.
Is there any way to solve this problem? Can anyone please help regarding this issue. It will be very helpful for me.
Thanks in Advance.

I faced the same issue before.
it's look like git do something like smart cloning which only clone the changes made to the repository.
issue resolved once i added an additional behavior to to Wipe out repository & force clone like below:

Related

Clone project from bitbucket when try to make changes in local it not reflect

When I am trying to add my code in local host in project which I cloned from bitbucket I not able to see any changes what to do please help me ! How to fix issue
Here's a link to a tutorial on how to use git with gitbucket.
https://support.atlassian.com/bitbucket-cloud/docs/tutorial-learn-bitbucket-with-git/

TortoiseHG clone Issue

I tried multiple times to clone my project but every time I received NOT FOUND ERROR: 255
Please review the attached screenshot. Thanks you
Isnt TortoiseHG a Mercurial client. And you should not write git clone in the address field and most likely even not https.
Bitbucket stopped serving Mercurial projects, now it's only git.
I think you should try using Bitbucket's own git client.

What does jenkins look into the project to start unit tests

I have looked into jenkins tutorials and all most all of them mention that we should provide with the URL to the git repo.
Fine.
But once jenkins has an access to the git repo, what part of project does it look into to figure out which tests should be run or wether to run them at all etc ? Is it some configuration file in the repo ?
Guess that depends on what kind of project your repo is. If I understand the question correctly. The provided url gives Jenkins the information to do a git clone url which checks out the project in Jenkins workspace.
Then according to the type, lets say it's a Maven-project, you fill in the goals you'd like Jenkins to run locally. Usually clean test. It is then run at top level, root of the project, guessing it will find a pom.xml there. If not you'll have to tell it where to look.
A more clearer answer would perhaps be easier if you told what kind of project you'd like to build.

Jenkins with Git and XCode: cannot pull sub-sub-module?

I use Jenkins for CI, and git for XCode project, I have the XCode integration plugin and Git plugin installed, one of the submodules in my project has a sub-submodule, but Jenkins cannot pull it although it is said to be able to do that.
Does anyone have the same issue and any solution to this? I guess I have to add another execution step that pull all the sub-submodules?
Thanks!
We have submodules and it seems to work well, but we had a project break on Thursday for reasons unknown, on a submodule so there must be some situations where the submodule makes it barf. If I find out more, I'll post it here.

Using Git with a Redmine hosted on Heroku

I have a question. I am using Redmine for a issue tracking system for my upcoming project and I recently did the install on Heroku and I was wondering if there was a good way to use Git via a github repository to do issue tracking (ie. I can make a commit, do a refs #issue_number and it would associate that commit with the issue I'm tracking). I know there is some way to do it with svn, but we want to use git for the project. I heard that heroku is unable to do Redmine with git from someone since you need a 'bare' and 'minimum' directory? (or something similar to that) Is this true? or is there a guide out there (I've been googling 'git with heroku and redmine' and other variants for the last little bit with no luck) on installing git to associate it with my github repository for my heroku based Redmine?
Thanks in advanced!
Just to clarify, you have mentioned that you are using GitHub, Redmine, and Heroku, and want to relate commits to issue numbers within Redmine.
I believe that Heroku will not come into this, but what you want to look at is a post-receive hook for your repository on GitHub.
The best direction I can give you is to follow this documentation, but select the "Redmine" post-receive hook, and set it up according to the detailed instructions that they provide.
The documentation for the hook explicitly states the following:
Commits which are related to Redmine issues are detected by matching '#IssueNo' in the commit message (i.e "fixing bug #234" is related to issue #234)
which I believe is the functionality that you are after. Please correct me if I am wrong.

Resources