Luke Granger-Brown
57725ef3ec
git-subtree-dir: third_party/nixpkgs git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
30 lines
632 B
Nix
30 lines
632 B
Nix
import ./make-test-python.nix ({ pkgs, ...} : rec {
|
|
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 -auth admin:$(cat /var/lib/jenkins/secrets/initialAdminPassword)"
|
|
)
|
|
'';
|
|
})
|