aboutsummaryrefslogtreecommitdiffstats
path: root/testing/jenkins/jenkins.logrotate
diff options
context:
space:
mode:
Diffstat (limited to 'testing/jenkins/jenkins.logrotate')
-rw-r--r--testing/jenkins/jenkins.logrotate17
1 files changed, 17 insertions, 0 deletions
diff --git a/testing/jenkins/jenkins.logrotate b/testing/jenkins/jenkins.logrotate
new file mode 100644
index 0000000000..33b1660045
--- /dev/null
+++ b/testing/jenkins/jenkins.logrotate
@@ -0,0 +1,17 @@
+/var/log/jenkins/jenkins.log /var/log/jenkins/access_log {
+ compress
+ dateext
+ maxage 365
+ rotate 99
+ size=+4096k
+ notifempty
+ missingok
+ create 644
+ postrotate
+ [ -r /etc/conf.d/jenkins ] && . /etc/conf.d/jenkins
+ if [ -s /var/run/jenkins.pid ]; then
+ JPID=$(cat /var/run/jenkins.pid)
+ test -n "$(find /proc/$JPID -maxdepth 0 -user ${RUN_AS:-jenkins} 2>/dev/null)" && kill -s ALRM $JPID || :
+ fi
+ endscript
+}