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

Git tool chooser unpacks then deletes git install in each job



    • Type: Improvement
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: git-plugin
    • Labels:
    • Environment:
      Jenkins 2.263
      Git plugin 4.4.5
      Git client plugin 3.5.1
    • Similar Issues:


      I have multiple git tool installers defined for Windows computers so that jobs have the option to declare their dependency on a specific version of Git for Windows. The git tool chooser iterates over each of those installers, installing them on the Windows computer as a tool, then deletes them.

      That's inefficient and should be resolved either by a code change to retain multiple tool installations or by documenting a technique so that the tool installers will not delete one another when multiple versions are installed.

      Job output in the console log looks like this:

      Started by upstream project "Bugs-Individual/Bugs-10-000-to-19-999/JENKINS-15103-open-pack-file-prevents-wipe-cli-jgit" build number 20
      originally caused by:
       Started by user Mark Waite
      Running as SYSTEM
      [EnvInject] - Loading node environment variables.
      Building remotely on mark-pc3-ssh (git-1.9+ amd64) in workspace C:\J\PC\workspace\Bugs-Individual\Bugs-10-000-to-19-999\JENKINS-15103-open-pack-file-prevents-wipe-cli-jgit\label\mark-pc3-ssh
      Unpacking https://home.markwaite.net/~mwaite/git/MinGit-2.27.0-busybox-64-bit.zip to C:\J\PC\tools\git on mark-pc3-ssh
      Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.11.1.zip to C:\J\PC\tools\git on mark-pc3-ssh
      Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.17.1.zip to C:\J\PC\tools\git on mark-pc3-ssh
      Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.20.1.zip to C:\J\PC\tools\git on mark-pc3-ssh
      Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.25.1.zip to C:\J\PC\tools\git on mark-pc3-ssh
      Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.26.2.zip to C:\J\PC\tools\git on mark-pc3-ssh
      Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.28.0.zip to C:\J\PC\tools\git on mark-pc3-ssh
      Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.29.0.zip to C:\J\PC\tools\git on mark-pc3-ssh
      Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.29.1.zip to C:\J\PC\tools\git on mark-pc3-ssh
      The recommended git tool is: C:\J\PC\tools\git\PortableGit-2.29.1\bin\git.exe
      No credentials specified
      Wiping out workspace first.
      Cloning the remote Git repository
      Avoid fetching tags
      Honoring refspec on initial clone
      Cloning repository https://github.com/MarkEWaite/jenkins-bugs

      Each of the "Unpacking" statements results in the tools\git directory being emptied of the current git tool then it is populated with the git tool that is being iterated. Since each of those git tool zip files is a 100 MB zip file, time is wasted installing each tool and then removing it.

      I now avoid the issue by having only a single git tool definition for the Windows agents. See my docker-lfs jenkins.yaml file for an example.



          There are no comments yet on this issue.


            Unassigned Unassigned
            markewaite Mark Waite
            0 Vote for this issue
            1 Start watching this issue