Open twherzog07 opened 4 years ago
Yes, I've been trying to find a solution to this for a while. I'm also bitbucket and can't figure out why it does not resolve the repository.
If I do a git checkout of that commit in my script it works, so the git fetch has it.
I nailed it down to this if statement in the git plugin :https://github.com/jenkinsci/git-plugin/blob/5edc26da3bd4962bdb8599ef1cbc40d335cd1129/src/main/java/hudson/plugins/git/GitSCM.java#L1139
which for for some reason does not match my configured repository (I only have one, I'm not using multiple repository)
I have not found a way (or had the time) to get some debug information on how the match between the commit repository and the configured repository happens. I'm not sure how to get a jenkins slave started under a debugger so that I can trace the code. Was hopping to be able to set debug level to trace or something.
This issue still exists; I am having this same issue (see https://github.com/jenkinsci/bitbucket-push-and-pull-request-plugin/issues/249 for my report on it). I think the issue might be related to the webhook sending the repo in HTTPS format whereas Jenkins is configured for SSH format. Or maybe not?
@cyberguard -- Is there any way to debug the contents of rpa
and also getRepositories()
to see what it is that is being compared? I will note that I do not have a multiple-repository configuration, either.
There is a comment in the git plugin that it is trying to avoid JENKINS-26587 -- should we open another Jenkins issue on this?
From what i Tested , It fails only when you got a branch specifier set in the Git Plugin , in case of * or ** it will give out the error but will still checkout the relevant revision ,
While if you have something specified ( In my case release/ASW_*), and even if the BITBUCKET_SOURCE_BRANCH matches , It checkouts the branch , but on a different revision then the latest .
I finally got around to updating to 1.5 and now when a PR triggers a build, the changes are no longer checked out, even though all the project settings remain the same. It seems that something is configured incorrectly, because I'm getting this message when it attempts to find the latest hash
I'm not exactly sure what it means, so I don't know what I need to do to fix it. Any help would be appreciated, thanks!