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

Automatically remove the cache created on disk when lightweight checkout is used

    XMLWordPrintable

Details

    Description

      The %JENKINS_HOME%\caches\git-<sha> directories are created by Pipeline jobs -I believe that ONLY when doing a lightweight checkout.

      The sha in the name of the directory %JENKINS_HOME%\caches\git-<sha> represent a key for a specific remote that is calculated from the remote URL: "git-" + hudson.Util.getDigestOf(<remote>). Each directory corresponds to a specific repository. If many jobs are cloning the same repository, they all point to the same "cache" directory.

      The problem comes when the repository are very large, which can produce to fill the disk space as there not seem to be any automatic mechanism for deleting these files.

      Attachments

        Issue Links

          Activity

            This is also used by branch indexing.

            allan_burdajewicz Allan BURDAJEWICZ added a comment - This is also used by branch indexing.

            Any updates or workaround with this one?

             

            I'm filling up a 20GBs in minutes.

            lsolano Lorenzo Solano Martinez added a comment - Any updates or workaround with this one?   I'm filling up a 20GBs in minutes.
            bitwiseman Liam Newman added a comment -

            lsolano
            Lightweight checkout is not part of git-plugin, so that plugin has no way of controlling that. Having a way to clean them up makes sense, but determining when to do so automatically would be difficult.

            Which plugin is alternating between lightweight checkout and not?

            bitwiseman Liam Newman added a comment - lsolano Lightweight checkout is not part of git-plugin, so that plugin has no way of controlling that. Having a way to clean them up makes sense, but determining when to do so automatically would be difficult. Which plugin is alternating between lightweight checkout and not?

            People

              Unassigned Unassigned
              fbelzunc Félix Belzunce Arcos
              Votes:
              3 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated: