diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2015-12-31 09:47:26 +0100 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2015-12-31 09:53:02 +0100 |
commit | f9f6f41bff2213e199bded515e9b66d1e5c4d7dd (patch) | |
tree | 29c5a75228e31f305f42c5b761709a186e406776 /nixos/modules/services/continuous-integration/jenkins/default.nix | |
parent | bbcf127c7c9029cba43493d7d25a9d1c65d59152 (diff) | |
parent | 468f698f609e123bb0ffae67181d07ac99eb2204 (diff) | |
download | nixpkgs-f9f6f41bff2213e199bded515e9b66d1e5c4d7dd.tar nixpkgs-f9f6f41bff2213e199bded515e9b66d1e5c4d7dd.tar.gz nixpkgs-f9f6f41bff2213e199bded515e9b66d1e5c4d7dd.tar.bz2 nixpkgs-f9f6f41bff2213e199bded515e9b66d1e5c4d7dd.tar.lz nixpkgs-f9f6f41bff2213e199bded515e9b66d1e5c4d7dd.tar.xz nixpkgs-f9f6f41bff2213e199bded515e9b66d1e5c4d7dd.tar.zst nixpkgs-f9f6f41bff2213e199bded515e9b66d1e5c4d7dd.zip |
Merge branch 'master' into closure-size
TODO: there was more significant refactoring of qtbase and plasma 5.5 on master, and I'm deferring pointing to correct outputs to later.
Diffstat (limited to 'nixos/modules/services/continuous-integration/jenkins/default.nix')
-rw-r--r-- | nixos/modules/services/continuous-integration/jenkins/default.nix | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/nixos/modules/services/continuous-integration/jenkins/default.nix b/nixos/modules/services/continuous-integration/jenkins/default.nix index 0568b1af7d5..ac64e861664 100644 --- a/nixos/modules/services/continuous-integration/jenkins/default.nix +++ b/nixos/modules/services/continuous-integration/jenkins/default.nix @@ -48,11 +48,33 @@ in { ''; }; + listenAddress = mkOption { + default = "0.0.0.0"; + example = "localhost"; + type = types.str; + description = '' + Specifies the bind address on which the jenkins HTTP interface listens. + The default is the wildcard address. + ''; + }; + port = mkOption { default = 8080; type = types.int; description = '' - Specifies port number on which the jenkins HTTP interface listens. The default is 8080. + Specifies port number on which the jenkins HTTP interface listens. + The default is 8080. + ''; + }; + + prefix = mkOption { + default = ""; + example = "/jenkins"; + type = types.str; + description = '' + Specifies a urlPrefix to use with jenkins. + If the example /jenkins is given, the jenkins server will be + accessible using localhost:8080/jenkins. ''; }; @@ -80,7 +102,7 @@ in { extraOptions = mkOption { type = types.listOf types.str; default = [ ]; - example = [ "--debug=9" "--httpListenAddress=localhost" ]; + example = [ "--debug=9" ]; description = '' Additional command line arguments to pass to Jenkins. ''; @@ -134,15 +156,18 @@ in { ''; script = '' - ${pkgs.jdk}/bin/java -jar ${pkgs.jenkins} --httpPort=${toString cfg.port} ${concatStringsSep " " cfg.extraOptions} + ${pkgs.jdk}/bin/java -jar ${pkgs.jenkins} --httpListenAddress=${cfg.listenAddress} \ + --httpPort=${toString cfg.port} \ + --prefix=${cfg.prefix} \ + ${concatStringsSep " " cfg.extraOptions} ''; postStart = '' - until ${pkgs.curl.bin}/bin/curl -s -L localhost:${toString cfg.port} ; do + until ${pkgs.curl.bin}/bin/curl -s -L ${cfg.listenAddress}:${toString cfg.port}${cfg.prefix} ; do sleep 10 done while true ; do - index=`${pkgs.curl.bin}/bin/curl -s -L localhost:${toString cfg.port}` + index=`${pkgs.curl.bin}/bin/curl -s -L ${cfg.listenAddress}:${toString cfg.port}${cfg.prefix}` if [[ !("$index" =~ 'Please wait while Jenkins is restarting' || "$index" =~ 'Please wait while Jenkins is getting ready to work') ]]; then exit 0 |