Skip to content

Commit

Permalink
[FIXED JENKINS-15178] Merged pull request #727
Browse files Browse the repository at this point in the history
  • Loading branch information
kohsuke committed Apr 19, 2014
2 parents 0634809 + 430667e commit 2bfc2bb
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions changelog.html
Expand Up @@ -55,6 +55,9 @@
<!-- 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.
Expand Down
1 change: 1 addition & 0 deletions osx/Library/Application Support/Jenkins/Uninstall.command
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions osx/scripts/postinstall-launchd
Expand Up @@ -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}

Expand Down
7 changes: 7 additions & 0 deletions osx/scripts/postinstall-launchd-jenkins
Expand Up @@ -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}

Expand Down

0 comments on commit 2bfc2bb

Please sign in to comment.