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
@@ -18,6 +18,29 @@ let
|
||||
in
|
||||
{
|
||||
devShells.${system} = {
|
||||
# `nix develop .#ci` -> the tool set a Gitea Actions job on sapphira
|
||||
# needs. Same list as the runner's hostPackages (lib/ci-tools.nix), so a
|
||||
# workflow can get the tools it needs without a nixos-rebuild:
|
||||
#
|
||||
# nix develop /etc/nixos#ci --command bash -c 'echo $PATH'
|
||||
#
|
||||
# The runner's own PATH is fixed in the systemd unit at activation time,
|
||||
# and changing it needs `nixos-rebuild switch` on the host. The workflows
|
||||
# in oqyude/winos therefore take the PATH from this devshell instead --
|
||||
# jq (scripts/update-manifest.sh) and pwsh (scripts/update-kvrt.ps1) are
|
||||
# not in the runner's default set, and `nix-shell -p` is not a fallback
|
||||
# on sapphira (empty nix registry, no channels).
|
||||
ci = pkgs.mkShell {
|
||||
name = "gitea-ci-devshell";
|
||||
|
||||
buildInputs = import ../lib/ci-tools.nix { inherit pkgs; };
|
||||
|
||||
shellHook = ''
|
||||
echo "[ci-devshell] jq: $(command -v jq || echo MISSING)"
|
||||
echo "[ci-devshell] pwsh: $(command -v pwsh || echo MISSING)"
|
||||
'';
|
||||
};
|
||||
|
||||
# `nix develop .#vtimeline` -> shell for testing the VeeamTimelineView
|
||||
# project (Playwright + ESLint + Prettier over a vanilla-JS frontend).
|
||||
vtimeline = pkgs.mkShell {
|
||||
|
||||
Reference in new issue
Block a user