Reputation: 15906
I created one job for polling the Git Source code.
First time it should clone the repository, and after that if repository exist then it should only pull
it.
See the following setting for job.
Problem: every time when i run this job it always clone's it rather then polling it.
I'm Checking on Fast remote polling, It says that repository should have only one branch. So for that i'm specifying the branch name.
What i'm missing here..?
Upvotes: 7
Views: 7045
Reputation: 15906
Make sure in slave git has latest version: See below for more details:
Upvotes: 2
Reputation: 1329512
There was a similar bug for Mercurial which pointed out to a credential issue.
So double-check the way your credentials are passed (either through the url or stored in a file, like a .netrc
for hhtps)
The point is: fast polling should fetch/pull, not clone. See hudson.plugins.git.GitSCM#compareRemoteRevisionWithImpl()
.
if (git.hasGitRepo()) {
// Repo is there - do a fetch
listener.getLogger().println("Fetching changes from the remote Git repositories");
// Fetch updates
for (RemoteConfig remoteRepository : paramRepos) {
fetchFrom(git, listener, remoteRepository);
}
listener.getLogger().println("Polling for changes in");
Upvotes: 1