fix(deploy): sync deploy/systemd/ units from webhook-deploy.sh (BIT-28183) #45

Merged
spark merged 1 commits from fix/BIT-28183-webhook-systemd-sync into main 2026-08-05 02:58:17 +01:00
Owner

Summary

  • webhook-deploy.sh (the only automated deploy path — root crontab, every 5 min) never synced deploy/systemd/, so new/changed units silently never reached /etc/systemd/system after the one-shot deploy.sh bootstrap. Root cause of the BIT-28132 gap. Added a step that copies deploy/systemd/*.service and *.timer to /etc/systemd/system + daemon-reload whenever deploy/systemd/ changes in the diff. New units still need one manual systemctl enable --now; changed units already enabled just need systemctl restart <unit>.
  • Documented the BIT-28183 decision in docs/deployment.md: keep the 5-minute cron poll as the permanent deploy path on CT222; news-deploy-hook.service stays un-enabled (unit file present via the sync above, but inactive) — rationale and how-to-enable-later are recorded.

Parent: BIT-28132

Test plan

  • bash -n deploy/scripts/webhook-deploy.sh — syntax OK
  • Simulated the copy loop against a scratch dir to confirm only *.service/*.timer sync (env.example templates excluded)
  • Next real deploy on CT222 will exercise the new branch live (first deploy/systemd/ change after merge)
## Summary - webhook-deploy.sh (the only automated deploy path — root crontab, every 5 min) never synced `deploy/systemd/`, so new/changed units silently never reached `/etc/systemd/system` after the one-shot `deploy.sh` bootstrap. Root cause of the BIT-28132 gap. Added a step that copies `deploy/systemd/*.service` and `*.timer` to `/etc/systemd/system` + `daemon-reload` whenever `deploy/systemd/` changes in the diff. New units still need one manual `systemctl enable --now`; changed units already enabled just need `systemctl restart <unit>`. - Documented the BIT-28183 decision in `docs/deployment.md`: keep the 5-minute cron poll as the permanent deploy path on CT222; `news-deploy-hook.service` stays un-enabled (unit file present via the sync above, but inactive) — rationale and how-to-enable-later are recorded. Parent: BIT-28132 ## Test plan - [x] `bash -n deploy/scripts/webhook-deploy.sh` — syntax OK - [x] Simulated the copy loop against a scratch dir to confirm only `*.service`/`*.timer` sync (env.example templates excluded) - [ ] Next real deploy on CT222 will exercise the new branch live (first `deploy/systemd/` change after merge)
spark added 1 commit 2026-08-05 02:52:52 +01:00
fix(deploy): sync deploy/systemd/ units from webhook-deploy.sh (BIT-28183)
Tests / bridge tests (pull_request) Successful in 1m22s
Tests / bridge tests (push) Successful in 1m54s
Tests / writer-pipeline tests (pull_request) Successful in 1m27s
Tests / writer-pipeline tests (push) Successful in 1m56s
Tests / frontend lib tests (push) Successful in 1m56s
Tests / frontend lib tests (pull_request) Successful in 48s
9e41743c53
The cron-driven webhook-deploy.sh never refreshed /etc/systemd/system,
so new/changed units in deploy/systemd/ silently rotted in git after
the one-shot deploy.sh bootstrap (root cause of the BIT-28132 gap).
Add a step that copies deploy/systemd/*.service and *.timer to
/etc/systemd/system + daemon-reload whenever deploy/systemd/ changes
in the diff; new units still need one manual systemctl enable --now.

Also record the BIT-28183 decision to keep the 5-minute cron poll as
the permanent deploy path on CT222 and leave news-deploy-hook.service
unenabled, in docs/deployment.md.

Paperclip-Agent: Tiago Neves (urlKey tiago-neves; id 5d084b36-f38f-42a5-a92a-520005afda4f)
Paperclip-Issue: BIT-28183
Paperclip-Run: 267defb1-b2d1-4a95-a8c0-4dd1c777834e
spark merged commit 9fc631b703 into main 2026-08-05 02:58:17 +01:00
Sign in to join this conversation.