add buildbot

This commit is contained in:
Ingolf Wagner 2024-07-17 21:48:22 +02:00
parent a003fc746b
commit 3933356f84
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
6 changed files with 173 additions and 29 deletions

View file

@ -117,6 +117,11 @@ with lib;
href = "http://10.100.0.1:2342/"; href = "http://10.100.0.1:2342/";
image = "https://media.giphy.com/media/fyLi0OuWysotq/giphy.gif"; image = "https://media.giphy.com/media/fyLi0OuWysotq/giphy.gif";
} }
{
label = "Build Bot";
href = "http://orbi.private:8010";
image = "https://i.giphy.com/media/v1.Y2lkPTc5MGI3NjExd2gxZDg4Mm92c280OWxlZXJoZ3V6MWozamI5c3M2dnd1M3pma2lydiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/UqcFByCQIOloWRXUxs/giphy.gif";
}
]; ];
}) })
(entry { (entry {

View file

@ -114,6 +114,26 @@
"type": "github" "type": "github"
} }
}, },
"buildbot-nix": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs",
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1720975977,
"narHash": "sha256-9x2Yjsw6t++go/jZ5prKGJFDl4b5+ei5eCgm10xorDI=",
"owner": "nix-community",
"repo": "buildbot-nix",
"rev": "93942c0a662b7c6ad80810ae9f99f80988a27b1d",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "buildbot-nix",
"type": "github"
}
},
"clan-core": { "clan-core": {
"inputs": { "inputs": {
"disko": "disko", "disko": "disko",
@ -125,7 +145,7 @@
"nixpkgs" "nixpkgs"
], ],
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix_2"
}, },
"locked": { "locked": {
"lastModified": 1720716544, "lastModified": 1720716544,
@ -146,8 +166,8 @@
"clan-core": [ "clan-core": [
"clan-core" "clan-core"
], ],
"flake-parts": "flake-parts", "flake-parts": "flake-parts_2",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
"lastModified": 1720813949, "lastModified": 1720813949,
@ -223,6 +243,27 @@
} }
}, },
"flake-parts": { "flake-parts": {
"inputs": {
"nixpkgs-lib": [
"buildbot-nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1719994518,
"narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": { "inputs": {
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
}, },
@ -240,7 +281,7 @@
"type": "github" "type": "github"
} }
}, },
"flake-parts_2": { "flake-parts_3": {
"inputs": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
"nixpkgs" "nixpkgs"
@ -260,7 +301,7 @@
"type": "github" "type": "github"
} }
}, },
"flake-parts_3": { "flake-parts_4": {
"inputs": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
"nixos-anywhere", "nixos-anywhere",
@ -382,7 +423,7 @@
}, },
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_3"
}, },
"locked": { "locked": {
"lastModified": 1720734513, "lastModified": 1720734513,
@ -443,7 +484,7 @@
"landingpage": { "landingpage": {
"inputs": { "inputs": {
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_3" "nixpkgs": "nixpkgs_4"
}, },
"locked": { "locked": {
"lastModified": 1709213960, "lastModified": 1709213960,
@ -462,11 +503,11 @@
"nixos-anywhere": { "nixos-anywhere": {
"inputs": { "inputs": {
"disko": "disko_2", "disko": "disko_2",
"flake-parts": "flake-parts_3", "flake-parts": "flake-parts_4",
"nixos-images": "nixos-images_2", "nixos-images": "nixos-images_2",
"nixos-stable": "nixos-stable", "nixos-stable": "nixos-stable",
"nixpkgs": "nixpkgs_4", "nixpkgs": "nixpkgs_5",
"treefmt-nix": "treefmt-nix_2" "treefmt-nix": "treefmt-nix_3"
}, },
"locked": { "locked": {
"lastModified": 1719852663, "lastModified": 1719852663,
@ -564,16 +605,16 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1717196966, "lastModified": 1720890539,
"narHash": "sha256-yZKhxVIKd2lsbOqYd5iDoUIwsRZFqE87smE2Vzf6Ck0=", "narHash": "sha256-1K32XHPcQBo8XdLDQNybfLQc9I8hqSZdjA/Ur3zW/io=",
"owner": "NixOS", "owner": "Nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "57610d2f8f0937f39dbd72251e9614b1561942d8", "rev": "19116ccf234e32acf133863d430506da68008550",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "Nixos",
"ref": "nixos-unstable", "ref": "nixos-unstable-small",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@ -655,6 +696,22 @@
} }
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": {
"lastModified": 1717196966,
"narHash": "sha256-yZKhxVIKd2lsbOqYd5iDoUIwsRZFqE87smE2Vzf6Ck0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "57610d2f8f0937f39dbd72251e9614b1561942d8",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1719848872, "lastModified": 1719848872,
"narHash": "sha256-H3+EC5cYuq+gQW8y0lSrrDZfH71LB4DAf+TDFyvwCNA=", "narHash": "sha256-H3+EC5cYuq+gQW8y0lSrrDZfH71LB4DAf+TDFyvwCNA=",
@ -670,7 +727,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_3": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1645527175, "lastModified": 1645527175,
"narHash": "sha256-WeewqaO48sCctiN+iwgZZEJRU29Si7vHHoLCINAvuk8=", "narHash": "sha256-WeewqaO48sCctiN+iwgZZEJRU29Si7vHHoLCINAvuk8=",
@ -685,7 +742,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_4": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1717926692, "lastModified": 1717926692,
"narHash": "sha256-THcv8qDqobZefHHluPjx/8n+MtVVb8ag/oJbKMqKNRo=", "narHash": "sha256-THcv8qDqobZefHHluPjx/8n+MtVVb8ag/oJbKMqKNRo=",
@ -701,7 +758,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_5": { "nixpkgs_6": {
"locked": { "locked": {
"lastModified": 1720542800, "lastModified": 1720542800,
"narHash": "sha256-ZgnNHuKV6h2+fQ5LuqnUaqZey1Lqqt5dTUAiAnqH0QQ=", "narHash": "sha256-ZgnNHuKV6h2+fQ5LuqnUaqZey1Lqqt5dTUAiAnqH0QQ=",
@ -717,7 +774,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_6": { "nixpkgs_7": {
"locked": { "locked": {
"lastModified": 1701263465, "lastModified": 1701263465,
"narHash": "sha256-lNXUIlkfyDyp9Ox21hr+wsEf/IBklLvb6bYcyeXbdRc=", "narHash": "sha256-lNXUIlkfyDyp9Ox21hr+wsEf/IBklLvb6bYcyeXbdRc=",
@ -733,7 +790,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_7": { "nixpkgs_8": {
"locked": { "locked": {
"lastModified": 1632855891, "lastModified": 1632855891,
"narHash": "sha256-crW76mt9/kbUBiKy/KiSnsQ9JEYgD3StDuYAMVkTbM0=", "narHash": "sha256-crW76mt9/kbUBiKy/KiSnsQ9JEYgD3StDuYAMVkTbM0=",
@ -747,7 +804,7 @@
"type": "indirect" "type": "indirect"
} }
}, },
"nixpkgs_8": { "nixpkgs_9": {
"locked": { "locked": {
"lastModified": 1720585496, "lastModified": 1720585496,
"narHash": "sha256-UONPcQR2r0voopd6pcNFmUv7p4TJPeAXzwnqWmaPujw=", "narHash": "sha256-UONPcQR2r0voopd6pcNFmUv7p4TJPeAXzwnqWmaPujw=",
@ -766,7 +823,7 @@
"overviewer": { "overviewer": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_2", "flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_6", "nixpkgs": "nixpkgs_7",
"pandoc_template": "pandoc_template" "pandoc_template": "pandoc_template"
}, },
"locked": { "locked": {
@ -823,7 +880,7 @@
"polygon-art": { "polygon-art": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_3", "flake-utils": "flake-utils_3",
"nixpkgs": "nixpkgs_7" "nixpkgs": "nixpkgs_8"
}, },
"locked": { "locked": {
"lastModified": 1688766095, "lastModified": 1688766095,
@ -872,16 +929,17 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"buildbot-nix": "buildbot-nix",
"clan-core": "clan-core", "clan-core": "clan-core",
"clan-fact-generators": "clan-fact-generators", "clan-fact-generators": "clan-fact-generators",
"flake-parts": "flake-parts_2", "flake-parts": "flake-parts_3",
"home-manager": "home-manager", "home-manager": "home-manager",
"home-manager-utils": "home-manager-utils", "home-manager-utils": "home-manager-utils",
"kmonad": "kmonad", "kmonad": "kmonad",
"landingpage": "landingpage", "landingpage": "landingpage",
"nixos-anywhere": "nixos-anywhere", "nixos-anywhere": "nixos-anywhere",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_5", "nixpkgs": "nixpkgs_6",
"nixpkgs-legacy_2211": "nixpkgs-legacy_2211", "nixpkgs-legacy_2211": "nixpkgs-legacy_2211",
"nixpkgs-legacy_2311": "nixpkgs-legacy_2311", "nixpkgs-legacy_2311": "nixpkgs-legacy_2311",
"nixpkgs-legacy_2405": "nixpkgs-legacy_2405", "nixpkgs-legacy_2405": "nixpkgs-legacy_2405",
@ -940,7 +998,7 @@
}, },
"srvos": { "srvos": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_8" "nixpkgs": "nixpkgs_9"
}, },
"locked": { "locked": {
"lastModified": 1720691926, "lastModified": 1720691926,
@ -1040,6 +1098,27 @@
} }
}, },
"treefmt-nix": { "treefmt-nix": {
"inputs": {
"nixpkgs": [
"buildbot-nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1720818892,
"narHash": "sha256-f52x9srIcqQm1Df3T+xYR5P6VfdnDFa2vkkcLhlTp6U=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "5b002f8a53ed04c1a4177e7b00809d57bd2c696f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"treefmt-nix_2": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"clan-core", "clan-core",
@ -1060,7 +1139,7 @@
"type": "github" "type": "github"
} }
}, },
"treefmt-nix_2": { "treefmt-nix_3": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixos-anywhere", "nixos-anywhere",

View file

@ -81,6 +81,8 @@
inputs.home-manager.follows = "home-manager"; inputs.home-manager.follows = "home-manager";
}; };
buildbot-nix.url = "github:nix-community/buildbot-nix";
# smoke test framwork to trigger tests (enable if I want to use it for real) # smoke test framwork to trigger tests (enable if I want to use it for real)
#smoke = { #smoke = {
# url = github:SamirTalwar/smoke; # url = github:SamirTalwar/smoke;
@ -99,6 +101,7 @@
outputs = outputs =
inputs@{ self inputs@{ self
, buildbot-nix
, clan-core , clan-core
, clan-fact-generators , clan-fact-generators
, flake-parts , flake-parts
@ -172,7 +175,7 @@
]; ];
}; };
specialArgs = { specialArgs = {
inherit private_assets; inherit private_assets inputs;
assets = ./assets; assets = ./assets;
factsGenerator = clan-fact-generators.lib { inherit pkgs; }; factsGenerator = clan-fact-generators.lib { inherit pkgs; };
clanLib = import ./lib/clanlib.nix { inherit (pkgs) lib; machineDir = ./machines; }; clanLib = import ./lib/clanlib.nix { inherit (pkgs) lib; machineDir = ./machines; };
@ -486,3 +489,4 @@
}); });
} }

View file

@ -0,0 +1,41 @@
{ pkgs, inputs, ... }: {
imports = [
inputs.buildbot-nix.nixosModules.buildbot-master
];
containers.buildbot = {
privateNetwork = false;
autoStart = true;
config = { config, lib, ... }: {
nixpkgs.pkgs = pkgs;
imports = [
../../components/monitor/container.nix
inputs.buildbot-nix.nixosModules.buildbot-master
];
system.stateVersion = "24.05";
services.logrotate.checkConfig = false; # because uid 3000 does not exist in here
services.postgresql = {
settings.port = 5433;
};
services.buildbot-nix.master = {
enable = true;
dbUrl = "postgresql://@:5433/buildbot";
# Domain name under which the buildbot frontend is reachable
domain = "orbi.private:8010";
admins = [ "palo" ];
authBackend = "none";
workersFile = pkgs.writeText "workers.json" ''
[
{ "name": "test", "pass": "password", "cores": 2 }
]
'';
};
};
};
}

View file

@ -0,0 +1,12 @@
{ pkgs, inputs, ... }: {
imports = [
inputs.buildbot-nix.nixosModules.buildbot-worker
];
services.buildbot-nix.worker = {
enable = true;
workerPasswordFile = pkgs.writeText "worker-password-file" "password";
};
}

View file

@ -32,6 +32,9 @@
#./social-jitsi.nix #./social-jitsi.nix
./social-matrix-terranix.nix ./social-matrix-terranix.nix
./buildbot-worker.nix
./buildbot-master.nix
]; ];
services.logrotate.checkConfig = false; # because uid 3000 does not exist in here services.logrotate.checkConfig = false; # because uid 3000 does not exist in here