Skip to content

Commit c8c06eb

Browse files
docs(site): document --all-repos and --source flags for secrets commands
Add the two opt-in project-scope discovery flags introduced in feat(secrets): #624 to the CLI reference page: - --all-repos: activates Preview-driven discovery across the entire ADO project, not just local lock files - --source <path>: filters to definitions whose ado-aw-metadata marker references the given template path Also adds a "Project-scope discovery" subsection with usage examples and updates the common-examples block with an --all-repos one-liner. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 1130ba4 commit c8c06eb

1 file changed

Lines changed: 29 additions & 2 deletions

File tree

site/src/content/docs/setup/cli.mdx

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ Options:
8080
- `--org <url>` -- Azure DevOps organization URL or bare org name
8181
- `--project <name>` -- Azure DevOps project name
8282
- `--pat <pat>` -- PAT for ADO API authentication
83-
- `--definition-ids <ids>` -- explicit comma-separated definition IDs (skips auto-detection)
83+
- `--definition-ids <ids>` -- explicit comma-separated definition IDs (skips auto-detection); mutually exclusive with `--all-repos` / `--source`
84+
- `--all-repos` -- **project-scope mode**: search every ado-aw definition in the ADO project, not just those with a local lock file; mutually exclusive with `--definition-ids`
85+
- `--source <path>` -- filter to definitions whose `# ado-aw-metadata` marker references this template path (e.g. `agents/security-scan.md`); activates the discovery code path; pairs with `--all-repos` to scope across the whole project
8486
- `--dry-run` -- print the planned set without calling the ADO API
8587

8688
### `secrets list [path]`
@@ -91,6 +93,7 @@ Options:
9193

9294
- `--json` -- emit machine-readable JSON
9395
- `--org`, `--project`, `--pat`, `--definition-ids` -- same as `secrets set`
96+
- `--all-repos`, `--source` -- same as `secrets set`
9497

9598
### `secrets delete <name> [path]`
9699

@@ -99,8 +102,29 @@ Delete a named variable from every matched definition. No-op when the variable i
99102
Options:
100103

101104
- `--org`, `--project`, `--pat`, `--definition-ids` -- same as `secrets set`
105+
- `--all-repos`, `--source` -- same as `secrets set`
102106
- `--dry-run` -- print the planned deletion without calling the ADO API
103107

108+
### Project-scope discovery (`--all-repos` / `--source`)
109+
110+
By default, `secrets` commands match ADO definitions by scanning local lock files. Two opt-in flags activate **Preview-driven discovery** instead — useful when local checkouts of every consumer pipeline aren't available:
111+
112+
- **`--all-repos`** — search every ado-aw definition in the ADO project, including consumer pipelines that include ado-aw templates but live in other repos. No local checkout of those repos is required.
113+
- **`--source <path>`** — restrict results to definitions whose `# ado-aw-metadata` marker references the given template path. Useful for fan-out token rotation: `ado-aw secrets set GITHUB_TOKEN --source agents/security-scan.md` updates every pipeline that includes that template across the entire project.
114+
115+
Both flags are mutually exclusive with `--definition-ids`. `enable`, `disable`, and `remove` are **not** affected — they retain their source-scoped safety semantics.
116+
117+
```bash
118+
# Rotate GITHUB_TOKEN on every ado-aw pipeline in the project
119+
ado-aw secrets set GITHUB_TOKEN --all-repos
120+
121+
# Update only pipelines that include a specific template
122+
ado-aw secrets set GITHUB_TOKEN --all-repos --source agents/security-scan.md
123+
124+
# Preview which definitions would be updated
125+
ado-aw secrets set GITHUB_TOKEN --all-repos --dry-run
126+
```
127+
104128
### `enable [path]`
105129

106130
Register an ADO build definition for each compiled pipeline discovered under `path` and ensure it is `enabled`. Matches existing definitions by YAML filename first, then by display name; creates a new definition when no match is found.
@@ -240,9 +264,12 @@ ado-aw compile
240264
# Verify a generated pipeline
241265
ado-aw check agent.lock.yml
242266

243-
# Set GITHUB_TOKEN on all matched pipelines
267+
# Set GITHUB_TOKEN on all matched pipelines (local lock files)
244268
ado-aw secrets set GITHUB_TOKEN
245269

270+
# Set GITHUB_TOKEN on every ado-aw pipeline in the project (no local checkout needed)
271+
ado-aw secrets set GITHUB_TOKEN --all-repos
272+
246273
# Register pipelines with ADO and set their token in one step
247274
ado-aw enable --also-set-token
248275

0 commit comments

Comments
 (0)