As of April, 30 2020 workaround is to install a custom build of Bitbucket Branch Source plugin
Error in Jenkins logs may look like:
13:44:13 ERROR: Could not do lightweight checkout, falling back to heavyweight 13:44:13 java.io.FileNotFoundException: URL: /rest/api/1.0/projects/RTS/repos/rts-test/browse/Jenkinsfile?at=pull-requests%2F1%2Fmerge&start=0&limit=500 13:44:13 at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getRequest(BitbucketServerAPIClient.java:831) 13:44:13 at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getFileContent(BitbucketServerAPIClient.java:1123) 13:44:13 at com.cloudbees.jenkins.plugins.bitbucket.filesystem.BitbucketSCMFile.content(BitbucketSCMFile.java:98) 13:44:13 at jenkins.scm.api.SCMFile.contentAsString(SCMFile.java:335) 13:44:13 at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:107) 13:44:13 at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:309) 13:44:13 at hudson.model.ResourceController.execute(ResourceController.java:97) 13:44:13 at hudson.model.Executor.run(Executor.java:428)
Error happens because of changes in Bitbucket 7.1 which are not supported properly by Bitbucket Branch Source plugin.
As of April, 30 2020 a workaround is to install a custom build of Bitbucket Branch Source plugin mentioned here: