Preform housekeeping on git repos cloned by DIB

Over time out git repos get large and require some upkeep. Ideally
this should be done in the source-repositories element.  We can revert
this code once we have landed that upstream.

Change-Id: I6b9ecd4448d97b5ab2bf3808ff36ff4e74be72e4
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2016-10-15 09:48:10 -04:00
parent 33fb903cfd
commit bd6413d1bb

View File

@ -769,6 +769,8 @@ node 'status.openstack.org' {
# Node-OS: trusty
node 'nodepool.openstack.org' {
# TODO(pabelanger): Move all of this back into nodepool manifest, it has
# grown too big.
$bluebox_username = hiera('nodepool_bluebox_username', 'username')
$bluebox_password = hiera('nodepool_bluebox_password')
$bluebox_project = hiera('nodepool_bluebox_project', 'project')
@ -851,6 +853,15 @@ node 'nodepool.openstack.org' {
content => hiera('infracloud_chocolate_ssl_cert_file_contents'),
require => Class['::openstackci::nodepool'],
}
cron { 'mirror_gitgc':
user => 'nodepool',
hour => '20',
minute => '0',
command => 'find /opt/dib_cache/source-repositories/ -type d -name "*.git" -exec git --git-dir="{}" gc \; >/dev/null',
environment => 'PATH=/usr/bin:/bin:/usr/sbin:/sbin',
require => Class['::openstackci::nodepool'],
}
}
# Node-OS: trusty