feat(ci): add the ci devshell with the Gitea runner tool set
test-runner / smoke (push) Successful in 1s
test-runner / smoke (push) Successful in 1s
Раннер на sapphira отдаёт job'у PATH, равный своему hostPackages, и он
фиксируется в systemd-юните при активации -- чтобы добавить туда инструмент,
нужен nixos-rebuild switch на хосте. Для workflow'ов в oqyude/winos это тупик:
jq (scripts/update-manifest.sh) и pwsh (scripts/update-kvrt.ps1) в наборе
раннера отсутствуют, а nix-shell -p не запасной путь -- реестр nix на sapphira
пустой, каналов нет, -p не находит nixpkgs.
Что сделано:
- lib/ci-tools.nix -- один список инструментов CI.
- devshells/default.nix: devshell `ci` (nix develop .#ci) с этим списком.
Workflow может взять PATH devshell'а и получить jq/pwsh без пересборки:
nix develop /etc/nixos#ci --command bash -c 'echo $PATH'
- modules/server/gitea-runner.nix: hostPackages берёт тот же список, чтобы
набор раннера и devshell не расходились; в списке теперь ещё и powershell.
Проверка: devshell собирается на sapphira (nix develop /etc/nixos#ci) и
отдаёт jq и pwsh.
This commit is contained in:
1 parent
78c50dee87
commit
665f38a501
3 files changed
+60
-11
No files matched your search
@@ -91,17 +91,11 @@ in
|
||||
container.options = "";
|
||||
};
|
||||
|
||||
# Default set (bash, coreutils, curl, gawk, gitMinimal, gnused,
|
||||
# nodejs, wget) plus what ZeroQ workflows are most likely to need.
|
||||
hostPackages = with pkgs; [
|
||||
bash coreutils curl gawk gitMinimal gnused nodejs wget
|
||||
nix
|
||||
python3
|
||||
cacert
|
||||
# scripts/update-manifest.sh in oqyude/winos hard-requires jq
|
||||
# ("for dep in curl jq") and the runner's PATH is exactly this list.
|
||||
jq
|
||||
];
|
||||
# The PATH of every host-mode job. One shared list (lib/ci-tools.nix) with
|
||||
# the `ci` devshell in devshells/default.nix, so the runner and the
|
||||
# devshell cannot drift apart: a workflow can get the same tools through
|
||||
# `nix develop /etc/nixos#ci` without waiting for a rebuild.
|
||||
hostPackages = import ../../lib/ci-tools.nix { inherit pkgs; };
|
||||
};
|
||||
|
||||
# ----- Workspace directory on tmpfs ---------------------------------------
|
||||
|
||||
Reference in new issue
Block a user