Add a mirror repack cron to git servers

Like the one on gerrit, but this one adds pack-refs (because
the git server on centos seems to deal with that better).

Change-Id: I1ed497a3690d2c030408010dbd56b6cd916b47fa
This commit is contained in:
James E. Blair 2013-08-22 12:14:49 -07:00
parent dea75ed695
commit 491363edd6
1 changed files with 10 additions and 0 deletions

View File

@ -99,6 +99,16 @@ class openstack_project::git (
mode => 'enforcing'
}
cron { 'mirror_repack':
user => 'cgit',
weekday => '0',
hour => '4',
minute => '7',
command => 'find /var/lib/git/ -type d -name "*.git" -print -exec git --git-dir="{}" repack -afd \; -exec git --git-dir="{}" pack-refs --all \;',
environment => 'PATH=/usr/bin:/bin:/usr/sbin:/sbin',
require => User['cgit'],
}
file { '/var/www/cgit/static/openstack.png':
ensure => present,
source => 'puppet:///modules/openstack_project/openstack.png',