Permalink
Browse files

Explode war to /var/cache/jenkins like Debian does.

There's some expected performance gain since people often deploy
$JENKINS_HOME over NFS.
  • Loading branch information...
1 parent 9353d96 commit 5a2d5eb6bd124dd9c934d72d6a00bec89de621d5 @kohsuke committed Mar 28, 2012
Showing with 6 additions and 2 deletions.
  1. +1 −1 opensuse/SOURCES/jenkins.init.in
  2. +2 −0 opensuse/SPECS/jenkins.spec
  3. +1 −1 rpm/SOURCES/jenkins.init.in
  4. +2 −0 rpm/SPECS/jenkins.spec
@@ -77,7 +77,7 @@ fi
export JAVA_HOME
JAVA_CMD="$JAVA_HOME/bin/java $JENKINS_JAVA_OPTIONS -DJENKINS_HOME=$JENKINS_HOME -jar $JENKINS_WAR"
-PARAMS="--javaHome=$JAVA_HOME --logfile=/var/log/jenkins/jenkins.log"
+PARAMS="--javaHome=$JAVA_HOME --logfile=/var/log/jenkins/jenkins.log --webroot=/var/cache/jenkins/war"
[ -n "$JENKINS_PORT" ] && PARAMS="$PARAMS --httpPort=$JENKINS_PORT"
[ -n "$JENKINS_AJP_PORT" ] && PARAMS="$PARAMS --ajp13Port=$JENKINS_AJP_PORT"
[ -n "$JENKINS_DEBUG_LEVEL" ] && PARAMS="$PARAMS --debug=$JENKINS_DEBUG_LEVEL"
@@ -69,6 +69,7 @@ rm -rf "%{buildroot}"
%__install -d "%{buildroot}%{workdir}/plugins"
%__install -d "%{buildroot}/var/log/jenkins"
+%__install -d "%{buildroot}/var/cache/jenkins"
%__install -D -m0755 "%{SOURCE1}" "%{buildroot}/etc/init.d/%{name}"
%__sed -i 's,@@WAR@@,%{_prefix}/%{name}.war,g' "%{buildroot}/etc/init.d/%{name}"
@@ -128,6 +129,7 @@ exit 0
%{_prefix}/%{name}.war
%attr(0755,jenkins,jenkins) %dir %{workdir}
%attr(0750,jenkins,jenkins) /var/log/jenkins
+%attr(0750,jenkins,jenkins) /var/cache/jenkins
%config(noreplace) /etc/logrotate.d/%{name}
%config /etc/init.d/%{name}
%config(noreplace) /etc/sysconfig/%{name}
@@ -71,7 +71,7 @@ do
done
JAVA_CMD="$JENKINS_JAVA_CMD $JENKINS_JAVA_OPTIONS -DJENKINS_HOME=$JENKINS_HOME -jar $JENKINS_WAR"
-PARAMS="--logfile=/var/log/jenkins/jenkins.log --daemon"
+PARAMS="--logfile=/var/log/jenkins/jenkins.log --webroot=/var/cache/jenkins/war --daemon"
[ -n "$JENKINS_PORT" ] && PARAMS="$PARAMS --httpPort=$JENKINS_PORT"
[ -n "$JENKINS_AJP_PORT" ] && PARAMS="$PARAMS --ajp13Port=$JENKINS_AJP_PORT"
[ -n "$JENKINS_DEBUG_LEVEL" ] && PARAMS="$PARAMS --debug=$JENKINS_DEBUG_LEVEL"
View
@@ -73,6 +73,7 @@ rm -rf "%{buildroot}"
%__install -d "%{buildroot}%{workdir}/plugins"
%__install -d "%{buildroot}/var/log/jenkins"
+%__install -d "%{buildroot}/var/cache/jenkins"
%__install -D -m0755 "%{SOURCE1}" "%{buildroot}/etc/init.d/%{name}"
%__sed -i 's,@@WAR@@,%{_prefix}/%{name}.war,g' "%{buildroot}/etc/init.d/%{name}"
@@ -133,6 +134,7 @@ exit 0
%{_prefix}/%{name}.war
%attr(0755,jenkins,jenkins) %dir %{workdir}
%attr(0750,jenkins,jenkins) /var/log/jenkins
+%attr(0750,jenkins,jenkins) /var/cache/jenkins
%config /etc/logrotate.d/%{name}
%config(noreplace) /etc/init.d/%{name}
%config(noreplace) /etc/sysconfig/%{name}

0 comments on commit 5a2d5eb

Please sign in to comment.