Merge pull request #18500 from tvon/fix/gocd-server-options

gocd-server: add startupOptions, empty extraOptions
This commit is contained in:
Joachim F 2016-09-15 13:24:48 +02:00 committed by GitHub
commit c571a7f221
2 changed files with 13 additions and 3 deletions

View File

@ -98,7 +98,7 @@ in {
];
description = ''
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 = [
"-Xms${cfg.initialJavaHeapSize}"
"-Xmx${cfg.maxJavaHeapMemory}"
@ -103,6 +103,15 @@ in {
"-Dcruise.server.port=${toString cfg.port}"
"-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 = [
"-X debug"
"-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"
@ -169,7 +178,8 @@ in {
script = ''
${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
'';