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..?
Simply clone your project's repo twice (or even more often). When your work on a feature branch is done, simply push that branch and check it out on your 2nd copy to run tests there.
There are two ways to clone the project(repository) from Github. Create a new Jenkins job called 'Clone-with-https', move to the “Source Control Management” setting, and choose “Git” options if you cannot see the Git options that mean the 'GitHub' plugin wasn't installed in the Jenkins machine.
Make sure in slave git has latest version: See below for more details:
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");
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