Puppet Class: gerrit::crons

Defined in:
modules/gerrit/manifests/crons.pp

Overview

sets up cron jobs for Gerrit



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'modules/gerrit/manifests/crons.pp', line 2

class gerrit::crons() {
    cron { 'list_mediawiki_extensions':
    # Gerrit is missing a public list of projects.
    # This hack list MediaWiki extensions repositories
        command => "/bin/ls -1d ${::gerrit::jetty::git_dir}/mediawiki/extensions/*.git | sed 's#.*/##' | sed 's/\\.git//' > /var/www/mediawiki-extensions.txt",
        user    => 'root',
        minute  => [0, 15, 30, 45],
    }

    cron { 'clear_gerrit_logs':
        # Gerrit rotates their own logs, but doesn't clean them out
        # Delete logs older than 30 days
        command => 'find /var/log/gerrit/ -name "*.gz" -mtime +30 -delete',
        user    => 'root',
        hour    => 1,
    }
}