dbf0221db6
Change-Id: I5a52c0fd0f5a35c32aa71c0f93500aa59e495066 Reviewed-on: https://review.openstack.org/14910 Reviewed-by: Paul Belanger <paul.belanger@polybeacon.com> Reviewed-by: James E. Blair <corvus@inaugust.com> Reviewed-by: Clark Boylan <clark.boylan@gmail.com> Approved: James E. Blair <corvus@inaugust.com> Tested-by: Jenkins
36 lines
955 B
Puppet
36 lines
955 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/gerrit/scripts/expire_old_reviews.py \
|
|
${script_user} ${script_key_file}",
|
|
require => File['/usr/local/gerrit/scripts'],
|
|
}
|
|
|
|
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',
|
|
}
|
|
}
|