Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-48737

Provide lightweight checkouts for Bitbucket Pull Requests

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • Jenkins 2.98
      Bitbucket Branch Source Plugin v 2.2.8
    • v2.4.3

      Currently when trying to do a Pull Request build using the Bitbucket Branch Source Plugin, it falls back to do a heavyweight checkout for both building the PR head revision and also the PR merged revision.

       

      ERROR: Could not do lightweight checkout, falling back to heavyweight
      java.io.FileNotFoundException: URL: /rest/api/1.0/projects/someproject/repos/somerepo/browse/jenkins.pipeline?at=PR-1184&start=0&limit=500
      	at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getRequest(BitbucketServerAPIClient.java:523)
      	at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getFileContent(BitbucketServerAPIClient.java:730)
      	at com.cloudbees.jenkins.plugins.bitbucket.filesystem.BitbucketSCMFile.content(BitbucketSCMFile.java:81)
      	at jenkins.scm.api.SCMFile.contentAsString(SCMFile.java:338)
      	at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:104)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:262)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:429)

       

      The URL parameter for the branch is "at=PR-1184", but should be:

      • For building the PR head revision: "refs/pull-requests/1184/from"
      • For building the PR merged revision: "refs/pull-requests/1184/merge"

      In both cases "refs/" can be omitted.

            Unassigned Unassigned
            pixman20 pixman20
            Votes:
            14 Vote for this issue
            Watchers:
            21 Start watching this issue

              Created:
              Updated:
              Resolved: