system-config/modules/gerrit/manifests/cron.pp
Monty Taylor 52db16762b Consume jeepyb.
Instead of keeping many of these files directly in the tree, use them
from the out-of-tree jeepyb project, which makes them easier to consume
for other people who are not us.

Change-Id: Id704f2e17dd80709ef63cbbf2c5475a08a835f91
Reviewed-on: https://review.openstack.org/16777
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
2012-11-30 18:02:30 +00:00

33 lines
935 B
Puppet

# == Class: gerrit::cron
#
class gerrit::cron(
$script_user = 'update',
$script_key_file = '/home/gerrit2/.ssh/id_rsa'
) {
cron { 'expireoldreviews':
user => 'gerrit2',
hour => '6',
minute => '3',
command => "python /usr/local/bin/expire-old-reviews ${script_user} ${script_key_file}",
require => Class['jeepyb'],
}
cron { 'gerrit_repack':
user => 'gerrit2',
weekday => '0',
hour => '4',
minute => '7',
command => 'find /home/gerrit2/review_site/git/ -type d -name "*.git" -print -exec git --git-dir="{}" repack -afd \;',
environment => 'PATH=/usr/bin:/bin:/usr/sbin:/sbin',
}
cron { 'removedbdumps':
user => 'gerrit2',
hour => '5',
minute => '1',
command => 'find /home/gerrit2/dbupdates/ -name "*.sql.gz" -mtime +30 -exec rm -f {} \;',
environment => 'PATH=/usr/bin:/bin:/usr/sbin:/sbin',
}
}