提交 2bfc2bb1 编写于 作者: K Kohsuke Kawaguchi

[FIXED JENKINS-15178] Merged pull request #727

......@@ -55,6 +55,9 @@ Upcoming changes</a>
<!-- Record your changes in the trunk here. -->
<div id="trunk" style="display:none"><!--=TRUNK-BEGIN=-->
<ul class=image>
<li class=rfe>
Enabled log rotation on the OSX package
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-15178">issue 15178</a>)
<li class=bug>
When measuring the length of the queue, jobs that consist of multiple subtasks should
count as more than 1.
......
......@@ -12,6 +12,7 @@ sudo rm /Library/LaunchDaemons/org.jenkins-ci.plist
sudo rm -rf /Applications/Jenkins "/Library/Application Support/Jenkins" /Library/Documentation/Jenkins
sudo rm -rf /Users/Shared/Jenkins
sudo rm -rf /var/log/jenkins
sudo rm -f /etc/newsyslog.d/jenkins.conf
sudo dscl . -delete /Users/jenkins
sudo dscl . -delete /Groups/jenkins
pkgutil --pkgs | grep 'org\.jenkins-ci\.' | xargs -n 1 sudo pkgutil --forget
......
......@@ -12,6 +12,13 @@ find /Users/Shared/Jenkins \( -not -user daemon -or -not -group daemon \) -print
mkdir -p /var/log/jenkins
chown daemon:daemon /var/log/jenkins
# Enable log rotation by newsyslog
cat <<_EOT_ > /etc/newsyslog.d/jenkins.conf
# logfilename [owner:group] mode count size when flags [/pid_file] [sig_num]
# Rotate jenkins log at midnight, and preserve old logs in 3 days
/var/log/jenkins/jenkins.log 644 3 * \$D0 J
_EOT_
# Load and start the launch daemon
/bin/launchctl load -w ${JENKINS_PLIST}
......
......@@ -71,6 +71,13 @@ chown jenkins:jenkins $JENKINS_TMPDIR
mkdir -p /var/log/jenkins
chown jenkins:jenkins /var/log/jenkins
# Enable log rotation by newsyslog
cat <<_EOT_ > /etc/newsyslog.d/jenkins.conf
# logfilename [owner:group] mode count size when flags [/pid_file] [sig_num]
# Rotate jenkins log at midnight, and preserve old logs in 3 days
/var/log/jenkins/jenkins.log 644 3 * \$D0 J
_EOT_
# Load and start the launch daemon
/bin/launchctl load -w ${JENKINS_PLIST}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册