fix(notify): open configured web run pages from ntfy

This commit is contained in:
2026-10-21 13:05:10 +01:00
parent 870c70aefa
commit 9ee2e003bf
12 changed files with 201 additions and 14 deletions
+29 -3
View File
@@ -74,9 +74,35 @@ artifacts=markdown,files
Independently of any `notify` block, the server publishes one run-level
notification to the `system` destination when a run needs a person: when it enters
`waiting` (a human stage asked for a decision) and when it fails. Nothing else
notifies — queued, running, succeeded, canceled and interrupted runs are silent.
The payload names the run and its pipeline and carries a `click` action
`pipelines://run/<id>` that opens that run in the Android app.
notifies by default — queued, running, canceled and interrupted runs are silent.
Runs explicitly started with notifications **on** also notify on success.
The payload names the run and its pipeline. Run notifications and stage hooks
use the configured web run link described below.
### Open notifications in the web app
Set `PIPELINES_WEB_PUBLIC_URL` on the **Pipelines server** to the authenticated web
proxy's phone-reachable origin, for example `https://pipelines.example.com` or
`http://192.168.1.20:8082` on a trusted LAN. Notifications then carry
`https://pipelines.example.com/runs/<id>`, opening that exact run in the browser
(or installed web app). The existing sign-in gate remains; after login the web
proxy returns to the requested run.
Use the address you actually open on the phone, not localhost, the API port, or
the ntfy address. No credentials, query, fragment or subpath are allowed. This
does not expose a port or add authentication to the underlying control API.
An invalid configured origin omits the click action and logs a configuration
warning rather than leaking credentials. Without this setting, existing
Android-only installations retain `pipelines://run/<id>` for compatibility.
Native installs save a default from the web proxy's advertised LAN address/port.
Override it with `PIPELINES_WEB_PUBLIC_URL=https://pipelines.example.com ./install`;
reinstalls preserve that saved choice unless overridden. Custom services set the
environment variable in their service definition; `pipelines service enable`
preserves it. Docker Compose accepts the same variable, pointing to a separately
reachable authenticated web proxy. Apply service changes only after active work
is finished. Already-delivered notifications keep their original click target;
verify a new notification after configuration is installed.
A genuine event notifies once: a run that stays `waiting` is not republished on a
read or restart, and a stage `notify` policy that already covers the same event