feat(ci): litterbox

This commit is contained in:
arcnmx 2024-02-27 13:20:55 -08:00
parent d66ab782d4
commit 49c31c1508
6 changed files with 64 additions and 4 deletions

View file

@ -181,6 +181,57 @@ jobs:
command: ci-build-cache
quiet: false
stdin: ${{ runner.temp }}/ci.build.cache
litterbox:
name: nodes-litterbox
runs-on: ubuntu-latest
steps:
- id: checkout
name: git clone
uses: actions/checkout@v4
with:
submodules: false
- id: nix-install
name: nix install
uses: arcnmx/ci/actions/nix/install@v0.7
- id: ci-dirty
name: nix test dirty
uses: arcnmx/ci/actions/nix/run@v0.7
with:
attrs: ci.job.litterbox.run.test
command: ci-build-dirty
quiet: false
stdout: ${{ runner.temp }}/ci.build.dirty
- id: ci-test
name: nix test build
uses: arcnmx/ci/actions/nix/run@v0.7
with:
attrs: ci.job.litterbox.run.test
command: ci-build-realise
ignore-exit-code: true
quiet: false
stdin: ${{ runner.temp }}/ci.build.dirty
- env:
CI_EXIT_CODE: ${{ steps.ci-test.outputs.exit-code }}
id: ci-summary
name: nix test results
uses: arcnmx/ci/actions/nix/run@v0.7
with:
attrs: ci.job.litterbox.run.test
command: ci-build-summarise
quiet: false
stdin: ${{ runner.temp }}/ci.build.dirty
stdout: ${{ runner.temp }}/ci.build.cache
- env:
CACHIX_SIGNING_KEY: ${{ secrets.CACHIX_SIGNING_KEY }}
id: ci-cache
if: always()
name: nix test cache
uses: arcnmx/ci/actions/nix/run@v0.7
with:
attrs: ci.job.litterbox.run.test
command: ci-build-cache
quiet: false
stdin: ${{ runner.temp }}/ci.build.cache
mediabox:
name: nodes-mediabox
runs-on: ubuntu-latest

View file

@ -64,7 +64,7 @@ in {
displayName = "flake update build";
environment = ["CACHIX_SIGNING_KEY" "GITHUB_REF"];
command = let
filteredHosts = [ "hakurei" "reimu" "aya" "tei" "mediabox" ];
filteredHosts = [ "hakurei" "reimu" "aya" "tei" "litterbox" "mediabox" ];
gcBetweenHosts = false;
nodeBuildString = concatMapStringsSep " && " (node: "nix build -Lf . nixosConfigurations.${node}.config.system.build.toplevel -o result-${node}" + optionalString gcBetweenHosts " && nix-collect-garbage -d") filteredHosts;
hostPath = builtins.getEnv "PATH";

View file

@ -25,7 +25,7 @@ with lib; {
};
jobs = let
enabledHosts = ["hakurei" "reimu" "aya" "tei" "mediabox" "ct"];
enabledHosts = ["hakurei" "reimu" "aya" "tei" "litterbox" "mediabox" "ct"];
in
mapAttrs' (k: nameValuePair "${k}") (genAttrs enabledHosts (host: {
tasks.${host}.inputs = channels.nixfiles.nixosConfigurations.${host}.config.system.build.toplevel;

View file

@ -32,7 +32,8 @@
'';
nf-actions-test = pkgs.writeShellScriptBin "nf-actions-test" ''
set -eu
for host in hakurei reimu aya tei mediabox ct; do
for host in hakurei reimu aya tei litterbox mediabox ct; do
echo testing $host...
nix run --argstr config "$NF_CONFIG_ROOT/ci/nodes.nix" -f '${inputs.ci}' job.$host.test
done
'';

View file

@ -14,7 +14,7 @@
systemd.network.networks.eth0 = {
name = "eth0";
matchConfig = {
MACAddress = "BC:24:11:34:F4:AB";
MACAddress = "BC:24:11:C4:66:AB";
Type = "ether";
};
DHCP = "yes";

View file

@ -93,6 +93,14 @@ module "mediabox_system_records" {
]
}
module "litterbox_system_records" {
source = "./system/records"
name = "litterbox"
zone_id = cloudflare_zone.gensokyo-zone_zone.id
zone_zone = cloudflare_zone.gensokyo-zone_zone.zone
local_v6 = "fd0a::be24:11ff:fec4:66ab"
}
module "idp_system_records" {
source = "./system/records"
name = "idp"