I faced with the same issue like in comment-321827 by Tim Downey: Lightweight checkout not working for PRs.
As I found the issue came in with version 2.2.6 when the bitbucket REST is used to get the content of Jenkinsfile instead of cloning it. The configuration for the BitBucket source to use HEAD instead of merge and also a BitBucket server is used.
Is there anything can be done to avoid this kind of issue?
I faced with the same issue like in [# comment-321827] by [~timdowney]: Lightweight checkout not working for PRs.
As I found the issue came in with version 2.2.6 when the bitbucket REST is used to get the content of Jenkinsfile instead of cloning it. The configuration for the BitBucket source to use HEAD instead of merge and also a BitBucket server is used.
Is there anything can be done to avoid this kind of issue?
We have just started trying to use the latest Jenkins LTS release and set up some pipelines and are seeing no Jenkins file on PR's quite a bit when there are some so it will not trigger a build. A lot of times when trying to manually run the build it seems to disable the job and won't run it from blue ocean. It seems pretty buggy. There seem to be quite a few little issues and annoyances. FWIW we are using an Enterprise (I suppose datacenter) internal Bitbucket server.
Can someone at least tell me the bitbucket API that it is using to try to check if there's a Jenkins file so I can at least confirm the API is not properly reporting it.
I can see this problem currently too and it currently happens only when using a fork. If we work with the main repo directly i didnt see this behavior. We dont use Bitbucket Datacenter.
I dont' think I've seen an issue like this in some time. Currently our Jenkins server is firewalled off from the Bitbucket server so we can only pull and are not even using webhooks.