Git repository caching on agents

Project goal: Cache git repositories on agents for faster checkout

Skills to study/improve: Java, Git

Details

The Jenkins git plugin clones remote git repositories into Jenkins workspaces on agents. The Jenkins agents frequently have other copies of the remote git repository which could be used as a local cache to reduce network data transfer from the remote git server to the local workspace. Those local copies could be in workspaces for previous builds of this job or they could be in workspaces for other branches of the same repository. Those local copies might also be maintained by administrators with periodic updates from the central repository.

Identify and use a well-chosen existing copy of the remote git repository as a reference repository for the git fetch that is being performed in the workspace. Default to dissociate the workspace repository from the reference repository during the fetch so that deletion of the reference repository will not harm the workspace repository.

Refer to pull request 502 for discussions and alternatives which can be considered. Stephen Connolly recommends that the capability be created as a separate plugin which extends the git plugin. That would avoid the risk of users seeing this new feature without intentionally installing a new plugin specifically for the feature. If a separate plugin is the path that is chosen, then Mark Waite will need additional help from other mentors that are more familiar with the Jenkins extension mechanisms.

Quickstart

The project idea is expected to require changes in both the git client plugin and the git plugin.

Install a git client plugin development environment by following the contributing instructions. Compile the plugin, run its automated tests, and confirm that the automated tests are passing. Enable coverage reporting and review the coverage report.

Install a git plugin development environment by following the contributing instructions. Compile the plugin, run its automated tests, and confirm that the automated tests are passing. Enable coverage reporting and review the coverage report.

Install an integrated development environment (Netbeans, Eclipse, IntelliJ, …​). Run the git plugin in the development environment. Set a breakpoint and confirm that the breakpoint is reached in the development environment.

Newbie-friendly issues

Consider implementing a fix for one of the newbie friendly issues.

Potential Mentors

Project Links

Organization Links

> Go back to other GSoC 2020 project ideas