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

Provide lightweight checkouts for Bitbucket Pull Requests

    XMLWordPrintable

    Details

    • Similar Issues:
    • Released As:
      v2.4.3

      Description

      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.

        Attachments

          Issue Links

            Activity

            pixman20 pixman20 created issue -
            roolebo Roman Bolshakov made changes -
            Field Original Value New Value
            Link This issue relates to JENKINS-42518 [ JENKINS-42518 ]
            roolebo Roman Bolshakov made changes -
            Link This issue relates to JENKINS-47978 [ JENKINS-47978 ]
            roolebo Roman Bolshakov made changes -
            Link This issue relates to JENKINS-45997 [ JENKINS-45997 ]
            casz Joseph Petersen (old) made changes -
            Released As v2.4.3
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Resolved [ 5 ]

              People

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

                Dates

                Created:
                Updated:
                Resolved: