I was a strange issue some times back when tried to build a jenkins job which checkouts the code based on the pull request commit ID.
For a TFS Git Gated Build it always required to checkout code based on the commit ID of pull request raised. But when i tried to check out code in jenkins using git plugin, got the error saying "Couldn't find any revision to build. Verify the repository and branch configuration for this job". But the provided commit ID was valid one ! At the same time it works fine for a different Commit ID. Only for Pull Request Commit ID it wasn't working !!
This issue can be fixed by mentioning th refspec in git plugin settings in jenkins job.
For a TFS Git Gated Build it always required to checkout code based on the commit ID of pull request raised. But when i tried to check out code in jenkins using git plugin, got the error saying "Couldn't find any revision to build. Verify the repository and branch configuration for this job". But the provided commit ID was valid one ! At the same time it works fine for a different Commit ID. Only for Pull Request Commit ID it wasn't working !!
This issue can be fixed by mentioning th refspec in git plugin settings in jenkins job.
+refs/pull/*:refs/remotes/origin/pr/*



