You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(site): document --all-repos and --source flags for secrets commands (#653)
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: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
-`--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
84
86
-`--dry-run` -- print the planned set without calling the ADO API
85
87
86
88
### `secrets list [path]`
@@ -91,6 +93,7 @@ Options:
91
93
92
94
-`--json` -- emit machine-readable JSON
93
95
-`--org`, `--project`, `--pat`, `--definition-ids` -- same as `secrets set`
96
+
-`--all-repos`, `--source` -- same as `secrets set`
94
97
95
98
### `secrets delete <name> [path]`
96
99
@@ -99,8 +102,29 @@ Delete a named variable from every matched definition. No-op when the variable i
99
102
Options:
100
103
101
104
-`--org`, `--project`, `--pat`, `--definition-ids` -- same as `secrets set`
105
+
-`--all-repos`, `--source` -- same as `secrets set`
102
106
-`--dry-run` -- print the planned deletion without calling the ADO API
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
+
104
128
### `enable [path]`
105
129
106
130
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
240
264
# Verify a generated pipeline
241
265
ado-aw check agent.lock.yml
242
266
243
-
# Set GITHUB_TOKEN on all matched pipelines
267
+
# Set GITHUB_TOKEN on all matched pipelines (local lock files)
244
268
ado-aw secrets set GITHUB_TOKEN
245
269
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
+
246
273
# Register pipelines with ADO and set their token in one step
0 commit comments