mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 04:19:19 -08:00
feat(ci): litterbox
This commit is contained in:
parent
d66ab782d4
commit
49c31c1508
6 changed files with 64 additions and 4 deletions
51
.github/workflows/nodes.yml
vendored
51
.github/workflows/nodes.yml
vendored
|
|
@ -181,6 +181,57 @@ jobs:
|
||||||
command: ci-build-cache
|
command: ci-build-cache
|
||||||
quiet: false
|
quiet: false
|
||||||
stdin: ${{ runner.temp }}/ci.build.cache
|
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:
|
mediabox:
|
||||||
name: nodes-mediabox
|
name: nodes-mediabox
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ in {
|
||||||
displayName = "flake update build";
|
displayName = "flake update build";
|
||||||
environment = ["CACHIX_SIGNING_KEY" "GITHUB_REF"];
|
environment = ["CACHIX_SIGNING_KEY" "GITHUB_REF"];
|
||||||
command = let
|
command = let
|
||||||
filteredHosts = [ "hakurei" "reimu" "aya" "tei" "mediabox" ];
|
filteredHosts = [ "hakurei" "reimu" "aya" "tei" "litterbox" "mediabox" ];
|
||||||
gcBetweenHosts = false;
|
gcBetweenHosts = false;
|
||||||
nodeBuildString = concatMapStringsSep " && " (node: "nix build -Lf . nixosConfigurations.${node}.config.system.build.toplevel -o result-${node}" + optionalString gcBetweenHosts " && nix-collect-garbage -d") filteredHosts;
|
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";
|
hostPath = builtins.getEnv "PATH";
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ with lib; {
|
||||||
};
|
};
|
||||||
|
|
||||||
jobs = let
|
jobs = let
|
||||||
enabledHosts = ["hakurei" "reimu" "aya" "tei" "mediabox" "ct"];
|
enabledHosts = ["hakurei" "reimu" "aya" "tei" "litterbox" "mediabox" "ct"];
|
||||||
in
|
in
|
||||||
mapAttrs' (k: nameValuePair "${k}") (genAttrs enabledHosts (host: {
|
mapAttrs' (k: nameValuePair "${k}") (genAttrs enabledHosts (host: {
|
||||||
tasks.${host}.inputs = channels.nixfiles.nixosConfigurations.${host}.config.system.build.toplevel;
|
tasks.${host}.inputs = channels.nixfiles.nixosConfigurations.${host}.config.system.build.toplevel;
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,8 @@
|
||||||
'';
|
'';
|
||||||
nf-actions-test = pkgs.writeShellScriptBin "nf-actions-test" ''
|
nf-actions-test = pkgs.writeShellScriptBin "nf-actions-test" ''
|
||||||
set -eu
|
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
|
nix run --argstr config "$NF_CONFIG_ROOT/ci/nodes.nix" -f '${inputs.ci}' job.$host.test
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
systemd.network.networks.eth0 = {
|
systemd.network.networks.eth0 = {
|
||||||
name = "eth0";
|
name = "eth0";
|
||||||
matchConfig = {
|
matchConfig = {
|
||||||
MACAddress = "BC:24:11:34:F4:AB";
|
MACAddress = "BC:24:11:C4:66:AB";
|
||||||
Type = "ether";
|
Type = "ether";
|
||||||
};
|
};
|
||||||
DHCP = "yes";
|
DHCP = "yes";
|
||||||
|
|
|
||||||
|
|
@ -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" {
|
module "idp_system_records" {
|
||||||
source = "./system/records"
|
source = "./system/records"
|
||||||
name = "idp"
|
name = "idp"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue