mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
nixos/jenkinsSlave: install java
Installs Java into the Jenkins agent and allows specifying the JDK/JRE package to use. This is necessary as Jenkins verifies if the agent contains Java installed through the java -fullversion command, which if not, the connection will fail.
This commit is contained in:
parent
63f0c334f0
commit
eeb3206a29
2 changed files with 17 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.services.jenkinsSlave;
|
||||
|
@ -46,6 +46,15 @@ in {
|
|||
this is the home of the "jenkins" user.
|
||||
'';
|
||||
};
|
||||
|
||||
javaPackage = mkOption {
|
||||
default = pkgs.jdk;
|
||||
defaultText = literalExpression "pkgs.jdk";
|
||||
description = ''
|
||||
Java package to install.
|
||||
'';
|
||||
type = types.package;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -64,5 +73,10 @@ in {
|
|||
uid = config.ids.uids.jenkins;
|
||||
};
|
||||
};
|
||||
|
||||
programs.java = {
|
||||
enable = true;
|
||||
package = cfg.javaPackage;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue