Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@
goose-host-report = p.callPackage ./pkgs/goose-host-report {
inherit goose-link;
};
goose-sync-watch = p.callPackage ./pkgs/goose-sync-watch { };
gws = p.callPackage ./pkgs/gws { };
hm-deploy-gate-sh = p.callPackage ./pkgs/hm-deploy-gate-sh { };
hm-deploy-canary-sh = p.callPackage ./pkgs/hm-deploy-canary-sh { };
Expand Down Expand Up @@ -3039,6 +3040,23 @@
touch $out
'';

# workstation-6w7i.27.19: goose-sync-watch unit tests.
goose-sync-watch = devboxPkgs.runCommand "goose-sync-watch-tests" {
nativeBuildInputs = [ devboxPkgs.python3 devboxPkgs.gnugrep ];
} ''
cd ${self}
python3 pkgs/goose-sync-watch/test_goose_sync_watch.py 2>&1 | tee "$TMPDIR/out.txt"
grep -q 'Ran 24 tests' "$TMPDIR/out.txt" || {
echo "GATE FAILURE: expected pinned 24 goose-sync-watch tests." >&2
exit 1
}
grep -q 'OK' "$TMPDIR/out.txt" || {
echo "GATE FAILURE: goose-sync-watch suite did not pass with OK." >&2
exit 1
}
touch $out
'';

# L6 (workstation-6w7i.27.2): on the NixOS hosts every goose -- goose-serve
# and the user's CLI -- runs /var/lib/goose/current, and only goose-link
# (the cutover, or a manual rollback) moves that link. So a merged pin,
Expand Down
19 changes: 19 additions & 0 deletions pkgs/goose-sync-watch/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# goose-sync-watch: alert the goose coordinator when johnnymo87/goose
# upstream-sync.yml (L1) fails or goes quiet (bead workstation-6w7i.27.19).
{ writeShellApplication
, python3
, gh
, coreutils
}:

writeShellApplication {
name = "goose-sync-watch";
runtimeInputs = [
python3
gh
coreutils
];
text = ''
exec ${python3}/bin/python3 ${./goose_sync_watch.py} "$@"
'';
}
Loading
Loading