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

Provide lightweight checkout capability for bitbucket to avoid repository clone for multi-branch pipeline jobs

    XMLWordPrintable

Details

    • Blue Ocean 1.4 - beta 2

    Description

      JENKINS-33273 introduced a lightweight checkout capability to allow SCM implementors to avoid having checkout the scm on the master to read the contents of the Jenkinsfile from the SCM.  The comments in that bug mention that git doesn't offer a way to do so but I would think this is possible to do using Bitbucket APIs to read a particular file's contents on a branch.  

      In our use case, our repository is multi-gigabyte and we have many developers working within it creating many branches so cloning the repo on master for every branch is very costly in terms of time and storage.

      Attachments

        Issue Links

          Activity

            michaelneale, yes it falls back and it works. I will open a new issue later today.

            ghristov88 Georgi Hristov added a comment - michaelneale , yes it falls back and it works. I will open a new issue later today.

            I am also seeing the same issue as Georgi using 2.2.7 plugin version.  I'm running with Bitbucket Server version 4.11.  Is there a Bitbucket version requirement for the API used to be available?

            netappbluedevil NetAppBlueDevil added a comment - I am also seeing the same issue as Georgi using 2.2.7 plugin version.  I'm running with Bitbucket Server version 4.11.  Is there a Bitbucket version requirement for the API used to be available?

            Is this feature toggle-able? Upgraded today from 2.2.3 and it randomly broke pipelines across the board. All of our jobs were configured to use the stash step in the @script directory to take advantage of that initial checkout. After upgrading to 2.2.7, jobs will sometimes do the heavy checkout while others will sometimes do the light checkout, with no real distinction as to why.

            Do we now need to explicitly have a step in our pipeline code to checkout out the repository? I've rolled back to 2.2.3 but I don't want to keep relying on an old version of the plugin. Does anyone have a recommendation on how to proceed?

            alunsford Aaron Lunsford added a comment - Is this feature toggle-able? Upgraded today from 2.2.3 and it randomly broke pipelines across the board. All of our jobs were configured to use the stash step in the @script directory to take advantage of that initial checkout. After upgrading to 2.2.7, jobs will sometimes do the heavy checkout while others will sometimes do the light checkout, with no real distinction as to why. Do we now need to explicitly have a step in our pipeline code to checkout out the repository? I've rolled back to 2.2.3 but I don't want to keep relying on an old version of the plugin. Does anyone have a recommendation on how to proceed?
            wlfbck Wolff added a comment - - edited

            Is it possible that Atlassian changed some licencing needed for this? We are running into the following error:

            com.atlassian.bitbucket.jenkins.internal.http.HttpRequestExecutorImpl handleErrorBitbucket - did not accept the request
            Failed to retrieve mirroring information for project Test and repo Testing
            com.atlassian.bitbucket.jenkins.internal.client.exception.BadRequestException: - response: 409 with body: '{"errors":[{"context":null,"message":"Mirroring requires a Bitbucket Data Center license.","exceptionName":"com.atlassian.bitbucket.mirroring.upstream.MirroringDisabledException"}]}'
            

            Unfortunately Jenkins output does not specify which request is not accepted, but since we also get

            Lightweight checkout support not available, falling back to full checkout.
            

            I assume the first part is the cause.

            wlfbck Wolff added a comment - - edited Is it possible that Atlassian changed some licencing needed for this? We are running into the following error: com.atlassian.bitbucket.jenkins.internal.http.HttpRequestExecutorImpl handleErrorBitbucket - did not accept the request Failed to retrieve mirroring information for project Test and repo Testing com.atlassian.bitbucket.jenkins.internal.client.exception.BadRequestException: - response: 409 with body: '{ "errors" :[{ "context" : null , "message" : "Mirroring requires a Bitbucket Data Center license." , "exceptionName" : "com.atlassian.bitbucket.mirroring.upstream.MirroringDisabledException" }]}' Unfortunately Jenkins output does not specify which request is not accepted, but since we also get Lightweight checkout support not available, falling back to full checkout. I assume the first part is the cause.
            kon Kalle Niemitalo added a comment - - edited

            wlfbck, the package name com.atlassian.bitbucket.jenkins.internal.http belongs to atlassian-bitbucket-server-integration-plugin, but this issue is for bitbucket-branch-source-plugin. I suggest you file a separate issue on atlassian-bitbucket-server-integration-plugin.

            The "Lightweight checkout support not available" message for atlassian-bitbucket-server-integration-plugin is being addressed in JENKINS-63033.

            kon Kalle Niemitalo added a comment - - edited wlfbck , the package name com.atlassian.bitbucket.jenkins.internal.http belongs to atlassian-bitbucket-server-integration-plugin, but this issue is for bitbucket-branch-source-plugin. I suggest you file a separate issue on atlassian-bitbucket-server-integration-plugin. The "Lightweight checkout support not available" message for atlassian-bitbucket-server-integration-plugin is being addressed in JENKINS-63033 .

            People

              vivek Vivek Pandey
              petehayes Peter Hayes
              Votes:
              18 Vote for this issue
              Watchers:
              33 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: