Search code examples
gitjenkinsjenkins-pipelinebitbucketjenkins-blueocean

Jenkins(BlueOcean) failing to build the PR created in BitBucket


After upgrading Jenkins to 2.235.5 and git 2.28.0, I'm seeing build failure on PR that's created in BitBukcet with the below errors

Branch indexing
ERROR: Could not do lightweight checkout, falling back to heavyweight
java.io.FileNotFoundException: URL: /rest/api/1.0/**repodetails**/browse/Jenkinsfile?at=pull-requests%2F823%2Fmerge&start=0&limit=500
at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getRequest(BitbucketServerAPIClient.java:834)
at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getFileContent(BitbucketServerAPIClient.java:1129)
at com.cloudbees.jenkins.plugins.bitbucket.filesystem.BitbucketSCMFile.content(BitbucketSCMFile.java:98)
at jenkins.scm.api.SCMFile.contentAsString(SCMFile.java:335)
at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:107)
at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:309)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:428)
 git.exe checkout -f dsadsdsaddsb2610278033e8sajdgasjgda # timeout=10
ERROR: Checkout failed
hudson.plugins.git.GitException: Command "git.exe checkout -f dsadsdsaddsb2610278033e8sajdgasjgda" returned status code 128:
stdout: 
stderr: fatal: reference is not a tree: dsadsdsaddsb2610278033e8sajdgasjgda
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2450)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$1100(CliGitAPIImpl.java:84)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:2767)
Caused: hudson.plugins.git.GitException: Could not checkout dsadsdsaddsb2610278033e8sajdgasjgda
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:2791)
at jenkins.plugins.git.MergeWithGitSCMExtension.checkout(MergeWithGitSCMExtension.java:144)
at jenkins.plugins.git.MergeWithGitSCMExtension.decorateRevisionToBuild(MergeWithGitSCMExtension.java:110)
at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:1063)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1168)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:125)
at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:155)
at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:142)
at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:309)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:428)

Is this an issue with Jenkins or BitBucket? Did anyone have the same issue?


Solution

  • I have to enable an option check for api for bitbucket plugin under configure system enter image description here