gocd-server: add startupOptions, empty extraOptions

The extraOptions option has default values which seems surprising.  This
moves those values to startupOptions (which is what gocd-agent uses) and
empties out the default extraOptions.

The gocd-agent startupOptions description was also changed to remove the
mention of the example (given there isn't one).
This commit is contained in:
Tom von Schwerdtner 2016-09-10 17:41:40 -04:00
parent ffddcc8807
commit e934231029
2 changed files with 13 additions and 3 deletions

View File

@ -98,7 +98,7 @@ in {
]; ];
description = '' description = ''
Specifies startup command line arguments to pass to Go.CD agent Specifies startup command line arguments to pass to Go.CD agent
java process. Example contains debug and gcLog arguments. java process.
''; '';
}; };

View File

@ -90,7 +90,7 @@ in {
''; '';
}; };
extraOptions = mkOption { startupOptions = mkOption {
default = [ default = [
"-Xms${cfg.initialJavaHeapSize}" "-Xms${cfg.initialJavaHeapSize}"
"-Xmx${cfg.maxJavaHeapMemory}" "-Xmx${cfg.maxJavaHeapMemory}"
@ -103,6 +103,15 @@ in {
"-Dcruise.server.port=${toString cfg.port}" "-Dcruise.server.port=${toString cfg.port}"
"-Dcruise.server.ssl.port=${toString cfg.sslPort}" "-Dcruise.server.ssl.port=${toString cfg.sslPort}"
]; ];
description = ''
Specifies startup command line arguments to pass to Go.CD server
java process.
'';
};
extraOptions = mkOption {
default = [ ];
example = [ example = [
"-X debug" "-X debug"
"-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005" "-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"
@ -169,7 +178,8 @@ in {
script = '' script = ''
${pkgs.git}/bin/git config --global --add http.sslCAinfo /etc/ssl/certs/ca-certificates.crt ${pkgs.git}/bin/git config --global --add http.sslCAinfo /etc/ssl/certs/ca-certificates.crt
${pkgs.jre}/bin/java -server ${concatStringsSep " " cfg.extraOptions} \ ${pkgs.jre}/bin/java -server ${concatStringsSep " " cfg.startupOptions} \
${concatStringsSep " " cfg.extraOptions} \
-jar ${pkgs.gocd-server}/go-server/go.jar -jar ${pkgs.gocd-server}/go-server/go.jar
''; '';