Automatic git cache maintenance on the controller

Goal: Automate the maintenance of cached git repositories on the Jenkins controller

Status: Selected




The project aims to add git-maintenance to improve performance of the Jenkins controller. Git-maintenance optimizes caches, thereby executing the git commands faster.


Git caches that exist on the controller can become slower and larger than necessary during the lifetime of the remote repositories. Command line git focuses on high performance for frequent operations and relies on end users to perform most repository maintenance. Garbage collection, removal of deleted branches, and other operations are not performed by default on most cached repositories. This project aims to undertake the responsibility of git maintenance tasks by doing all the hard work behind the scenes and providing a simple user interface to configure the maintenance.


Two separate plugins are used to implement the Git Cache Maintenance

  1. Git Plugin - Administrators can enable maintenance tasks by configuring required settings in the UI. Based on this configuration, Git Plugin schedules maintenance tasks for caches present on the controller. It uses background process to perform scheduling. Based on the git-version present on the system, it decides which maintenance tasks it can execute. The result regarding the execution is displayed to the Administrator in the UI.

  2. Git Client Plugin - Responsible for execution of maintenance tasks(GitCLI) by Jenkins.

Development Strategy: Test Driven Development (Suggested by the mentors).

Office hours