fix(cli): artifact-deploy commands exit 1 when any site failed

site deploy-artifacts and deploy artifacts rendered the per-site summary and
always exited 0, so a script could not tell a failed site (unreachable,
missing or unreadable secret, partial apply) from a clean deploy. Both now
route through the failureCount rule deploy site already used.
This commit is contained in:
Joseph Doherty
2026-09-28 21:23:52 -04:00
parent 23a139a46c
commit ef03a0dca7
4 changed files with 89 additions and 4 deletions
+7
View File
@@ -965,6 +965,11 @@ scadabridge --url <url> site deploy-artifacts [--site-id <int>]
|--------|----------|-------------|
| `--site-id` | no | Target site ID; deploys system-wide artifacts to exactly that site. Omit to deploy fleet-wide to all sites. A site-scoped (non-Administrator) Deployer must supply an in-scope `--site-id`; fleet-wide deployment requires a system-wide Deployer or Administrator (arch-review C2). |
Output is the per-site result matrix (`siteId`, `siteName`, `success`, `errorMessage`,
`secretsDeployed`, `secretsRemoved`) plus `successCount` / `failureCount`. The command exits `1`
when `failureCount` is non-zero — a site that failed (unreachable, a missing or unreadable
secret, a partial secret apply) is a failed command even though the HTTP call succeeded.
#### `site area list`
List all areas for a site.
@@ -1107,6 +1112,8 @@ scadabridge --url <url> deploy artifacts [--site-id <int>]
|--------|----------|-------------|
| `--site-id` | no | Target site ID; deploys to exactly that site. Omit to deploy fleet-wide. A site-scoped (non-Administrator) Deployer must supply an in-scope `--site-id`; fleet-wide requires a system-wide Deployer or Administrator (arch-review C2). |
Same output and exit-code rule as `site deploy-artifacts`: exit `1` when any site failed.
#### `deploy status`
Query deployment records, with optional filters and pagination.