mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
jenkins-cli requires the -http parameter now, otherwise it fails to connect to Jenkins and the tests fail. https://www.jenkins.io/changelog-stable/#v2.541.3 Signed-off-by: Felix Singer <felixsinger@posteo.net>
31 lines
602 B
Nix
31 lines
602 B
Nix
{ pkgs, ... }:
|
|
{
|
|
name = "jenkins-cli";
|
|
meta = with pkgs.lib.maintainers; {
|
|
maintainers = [ pamplemousse ];
|
|
};
|
|
|
|
nodes = {
|
|
machine =
|
|
{ ... }:
|
|
{
|
|
services.jenkins = {
|
|
enable = true;
|
|
withCLI = true;
|
|
};
|
|
};
|
|
};
|
|
|
|
testScript = ''
|
|
start_all()
|
|
|
|
machine.wait_for_unit("jenkins")
|
|
|
|
assert "JENKINS_URL" in machine.succeed("env")
|
|
assert "http://0.0.0.0:8080" in machine.succeed("echo $JENKINS_URL")
|
|
|
|
machine.succeed(
|
|
"jenkins-cli -http -auth admin:$(cat /var/lib/jenkins/secrets/initialAdminPassword)"
|
|
)
|
|
'';
|
|
}
|