5

We have a reasonably large git repository (about 8Gb) with many different projects in it. I want Jenkins to be able to build each project without each project having to clone the whole repo for each project.

We have recently switched from SVN to git, and I am updating Jenkins to use git. With SVN I could simply do a partial checkout to get what I needed for each project. I've been told that we are not splitting up the large git repo into smaller ones.

As far as I can tell there are three approaches:

  1. A git clone for each project. Simplest, but uses a large amount of space. We'd like to avoid this one if possible.
  2. A single 'main' git clone, with each project local-cloning from that (and git can save space using hard links - this is on Linux). This seems quite complicated to setup and to get Jenkins to recognise changes that need building.
  3. A way to have no local clones, but to just get the files needed for each project directly from the remote. Not sure how this would work though.

Are there viable options that I've missed? Which is the best option?

This is similar to Jenkins: How To Build multiple top-level projects from a git repository? but, I think, different enough that this question is worth asking.

Community
  • 1
  • 1
cdjc
  • 1,039
  • 12
  • 24
  • 1
    possible duplicate of [How can I get multiple Jenkins builds to work from one local git repo?](http://stackoverflow.com/questions/9914664/how-can-i-get-multiple-jenkins-builds-to-work-from-one-local-git-repo) – 1615903 Sep 24 '15 at 04:59
  • Using the Clone Workspace plugin is what I used to accomplish this. However, the guy above is correct, this has been answered elsewhere. – Arran Sep 24 '15 at 09:20
  • Thanks. Not sure how I missed the duplicate. I did look.... – cdjc Sep 25 '15 at 02:59

0 Answers0