Permalink
Browse files

Merge pull request #1 from detroit-labs/java-memory-config

Optional heap and permgen args for java VM
  • Loading branch information...
bilke committed Apr 8, 2013
2 parents 9a11a5c + 1a451a8 commit b104022e35301acafd50b6190138bcce5a6b6aa5
Showing with 11 additions and 3 deletions.
  1. +2 −0 manifests/config.pp
  2. +9 −3 templates/dev.jenkins.plist.erb
View
@@ -13,4 +13,6 @@
$accesslogfile = "${nginx::config::logdir}/jenkins.access.log"
$errorlogfile = "${nginx::config::logdir}/jenkins.error.log"
$port = 18080
+ $max_heap_size = $jenkins_max_heap_size
+ $max_perm_size = $jenkins_max_perm_size
}
@@ -16,13 +16,19 @@
<key>EnvironmentVariables</key>
<dict>
- <key>JENKINS_HOME</key>
- <string><%= scope.lookupvar "jenkins::config::datadir" %></string>
+ <key>JENKINS_HOME</key>
+ <string><%= scope.lookupvar "jenkins::config::datadir" %></string>
</dict>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/java</string>
+ <%- if scope.lookupvar "jenkins::config::max_heap_size" -%>
+ <string>-Xmx<%= scope.lookupvar "jenkins::config::max_heap_size" %></string>
+ <%- end -%>
+ <%- if scope.lookupvar "jenkins::config::max_perm_size" -%>
+ <string>-XX:MaxPermSize=<%= scope.lookupvar "jenkins::config::max_perm_size" %></string>
+ <%- end -%>
<string>-jar</string>
<string><%= scope.lookupvar "jenkins::config::warfile" %></string>
<string>--httpListenAddress=127.0.0.1</string>
@@ -45,4 +51,4 @@
<key>StandardOutPath</key>
<string><%= scope.lookupvar "jenkins::config::consolefile" %></string>
</dict>
-</plist>
+</plist>

0 comments on commit b104022

Please sign in to comment.