Add cron job to compress jenkins logs.
Change-Id: I104d7aa9f2fd2fc0b04e0541c9120c4ee15693e0 Reviewed-on: https://review.openstack.org/13234 Reviewed-by: Clark Boylan <clark.boylan@gmail.com> Approved: James E. Blair <corvus@inaugust.com> Tested-by: Jenkins
This commit is contained in:
parent
cf9895ea31
commit
86e371e631
@ -52,4 +52,11 @@ class openstack_project::static (
|
|||||||
ensure => directory
|
ensure => directory
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cron { "gziplogs":
|
||||||
|
user => root,
|
||||||
|
hour => "*/6",
|
||||||
|
command => 'sleep $((RANDOM\%600)) && flock -n /var/run/gziplogs.lock find /srv/static/logs/ \( -name \*.txt -or -name \*.html \) -exec gzip \{\} \;',
|
||||||
|
environment => "PATH=/var/lib/gems/1.8/bin:/usr/bin:/bin:/usr/sbin:/sbin",
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user