Mark Waite commented on Bug JENKINS-22319

I think I can duplicate the failure you're seeing, but I think it is expected behavior rather than a bug. However, based on what I'm observing, I can't see how the job ever worked. I suspect that means I don't understand. Hopefully you can help me better understand.

The job definition seems to declare that "Branches to build" is refs/heads/jenkins, but when I clone that repository using the refspec in the job definition, there is no refs/heads/jenkins . I cloned the repository with the command

git clone --reference /var/lib/git/mwaite/skrooge.git/ git://anongit.kde.org/skrooge.git

I also created a Jenkins job which cloned that same repository and confirmed that there was no .git/refs/heads/jenkins in the cloned repository in Jenkins either. Since there is not a branch named jenkins on the remote repository, I thought it was reasonable that the clone did not create a branch named jenkins on the local repository.

Since you said that you're using a branch which will only exist locally on the build slave, I assumed you intended to add the additional behaviour "Check out to specific local branch" and that the name of that local branch would be "jenkins". I don't see that local branch in the job definition.

If I define my test job "Branches to build" as "master" or "origin/master" or "*/master" and add the "Check out to specific local branch" and have it execute a single shell build step "git branch", it runs successfully and reports that the current branch is "jenkins".

If I define my test job "Branches to build" as "refs/heads/jenkins" it fails to checkout a revision because it cannot resolve refs/heads/jenkins as a git version.

Can you clarify where I've misunderstood?

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to