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

Reduce resource usage during matrix builds by cloning centrally first

      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.

          [JENKINS-28098] Reduce resource usage during matrix builds by cloning centrally first

          Simon Richter created issue -
          Mark Waite made changes -
          Link New: This issue is related to JENKINS-18698 [ JENKINS-18698 ]
          Mark Waite made changes -
          Summary Original: Reduce resource usage during matrix builds New: Reduce resource usage during matrix builds by cloning centrally first
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 162811 ] New: JNJira + In-Review [ 181029 ]
          Nicolas De Loof made changes -
          Assignee Original: Nicolas De Loof [ ndeloof ]

          Mark Waite added a comment -

          Won't be implemented. There are other techniques (like reference repositories) that provide the same benefit.

          Mark Waite added a comment - Won't be implemented. There are other techniques (like reference repositories) that provide the same benefit.
          Mark Waite made changes -
          Resolution New: Won't Do [ 10001 ]
          Status Original: Open [ 1 ] New: Closed [ 6 ]

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

              Created:
              Updated:
              Resolved: