mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
nixos/jenkins: Introduce javaPackage option; Bump Java version to 21 (#412480)
This commit is contained in:
commit
7f7282e533
2 changed files with 8 additions and 12 deletions
|
@ -11,13 +11,7 @@ in
|
|||
{
|
||||
options = {
|
||||
services.jenkins = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable the jenkins continuous integration server.
|
||||
'';
|
||||
};
|
||||
enable = lib.mkEnableOption "Jenkins, a continuous integration server";
|
||||
|
||||
user = lib.mkOption {
|
||||
default = "jenkins";
|
||||
|
@ -89,11 +83,13 @@ in
|
|||
|
||||
package = lib.mkPackageOption pkgs "jenkins" { };
|
||||
|
||||
javaPackage = lib.mkPackageOption pkgs "jdk21" { };
|
||||
|
||||
packages = lib.mkOption {
|
||||
default = [
|
||||
pkgs.stdenv
|
||||
pkgs.git
|
||||
pkgs.jdk17
|
||||
pkgs.jdk21
|
||||
config.programs.ssh.package
|
||||
pkgs.nix
|
||||
];
|
||||
|
@ -239,7 +235,7 @@ in
|
|||
|
||||
# For reference: https://wiki.jenkins.io/display/JENKINS/JenkinsLinuxStartupScript
|
||||
script = ''
|
||||
${pkgs.jdk17}/bin/java ${lib.concatStringsSep " " cfg.extraJavaOptions} -jar ${cfg.package}/webapps/jenkins.war --httpListenAddress=${cfg.listenAddress} \
|
||||
${cfg.javaPackage}/bin/java ${lib.concatStringsSep " " cfg.extraJavaOptions} -jar ${cfg.package}/webapps/jenkins.war --httpListenAddress=${cfg.listenAddress} \
|
||||
--httpPort=${toString cfg.port} \
|
||||
--prefix=${cfg.prefix} \
|
||||
-Djava.awt.headless=true \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue