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

Reduce resource usage during matrix builds by cloning centrally first

XMLWordPrintable

      During a matrix build, the repository is cloned once for each configuration, and an extra time for the coordinating build in the matrix.

      It should be possible to create a single copy of the repository and reuse that for each of the builds, which should reduce network traffic, server load on the git remote being queried and disk usage, and improve build time.

      A possible implementation strategy would be to ensure that the .git directory from the toplevel workspace is always used, and to coordinate that only a single process may invoke "git fetch" at a time. Other processes can simply wait for the active fetch operation to complete, and need not do anything if the same parameters were used (as would be likely).

      Unless there are submodules, it is also not necessary to check out any files in the coordinating build, and even with submodules, only .gitmodules is strictly necessary.

            Unassigned Unassigned
            simonrichter Simon Richter
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: