Files
distributor/docs/operations.md

50 lines
1.9 KiB
Markdown
Raw Normal View History

2026-05-31 02:21:36 +00:00
# Distributor Operations
## Normal workflow
Preview a local publication:
```sh
go run ./cmd/distributor run --config examples/local-publish.yml --dry-run
```
Run the local publication:
```sh
go run ./cmd/distributor run --config examples/local-publish.yml
```
2026-05-31 02:28:48 +00:00
Run the local HTML publication:
```sh
go run ./cmd/distributor run --config examples/local-html.yml
```
2026-05-31 02:21:36 +00:00
## Filesystem layout
Source bundles are discovered beneath the configured local source root. Destination bundle paths preserve the source bundle path relative to that source root.
The maintained example writes under `workspace/`, which is ignored by Git.
## Destination state
2026-05-31 02:28:48 +00:00
Each published destination bundle contains `.distributor.json`. This state file records the source manifest, copied source outputs, and generated outputs. It is the authoritative marker that a destination path is managed by `distributor`.
2026-05-31 02:21:36 +00:00
`manifest.json` from the source bundle is not copied as destination state.
## Retry behavior
If a destination already has matching `.distributor.json`, publication skips it as already published.
If destination state is older than the source manifest, publication replaces only managed outputs recorded in `.distributor.json` plus the state file.
If a write fails during local publication, `distributor` removes outputs written during that failed attempt where possible so a retry does not see an unmanaged destination.
2026-05-31 02:33:09 +00:00
If one destination fails, later destinations in the same fan-out are still planned and run where they are independent. The command exits non-zero after printing the final status when any destination fails.
After a successful publish or replacement, the internal notifier hook runs as a no-op. Skipped destinations do not invoke it.
2026-05-31 02:21:36 +00:00
## Caveats
2026-05-31 02:33:09 +00:00
Only local-to-local publication is implemented. SSH, S3, external notification adapters, and force overwrite behavior are not implemented.