Optimize repos for size when preparing for nodecache

We currently run 'git gc' on repos before creating the tarball for the
node cache. On busy repos this is not enough to cut down the size of
the repo. With more aggressive pruning and packing one of our repos in
the cache got down from 6GB to 1.8GB.

Change-Id: I7ef428c25fde713efabd966d59b5bd97ec248d7e
This commit is contained in:
Tobias Henkel 2020-03-02 09:54:56 +01:00
parent 3cbce518ad
commit e0e3f3b81c
No known key found for this signature in database
GPG Key ID: 03750DEC158E5FA2

View File

@ -19,7 +19,7 @@
- skip_ansible_lint
- name: Run git garbage collection
command: git gc
command: git gc --prune=now --aggressive
args:
chdir: "{{ git_cache_root }}/{{ item.canonical_name }}"
with_items: "{{ zuul.projects.values() | list }}"