Skip to content

Commit 3b096f0

Browse files
docs(site): fix pipeline_agent_name marker and document agent_display_name (#710)
1 parent f116f57 commit 3b096f0

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

site/src/content/docs/reference/template-markers.mdx

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,19 @@ This distinction allows resources (like templates) to be available as pipeline r
9696
- checkout: reponame
9797
```
9898

99-
## `{{ agent_name }}`
99+
## `{{ pipeline_agent_name }}`
100100

101-
Should be replaced with the human-readable name from the front matter (e.g., "Daily Code Review"). This is used for display purposes like stage names.
101+
Replaced with a sanitized version of the `name:` front matter field, used as the ADO pipeline `name:` value (the build number prefix visible in the ADO UI and `$(Build.BuildNumber)`).
102+
103+
Sanitization strips characters that ADO rejects in build numbers (`"`, `/`, `:`, `<`, `>`, `\`, `|`, `?`, `@`, `*`), trims surrounding whitespace and any trailing dot, and truncates to ADO's build-number length limit. If the result is empty after sanitization, it falls back to `"pipeline"`.
104+
105+
Example: `name: Daily safe-output smoke: "noop" @nightly` → `Daily safe-output smoke noop nightly`.
106+
107+
## `{{ agent_display_name }}`
108+
109+
Replaced with the raw `name:` front matter value as a YAML double-quoted scalar (e.g., `"Daily Code Review"`). Used in the `displayName:` property of the outermost stage block in `target: stage` pipelines, and in the 1ES template's `templateContext.buildJob.displayName` property.
110+
111+
Always quoted to handle names that contain characters (such as `:`) that ADO would otherwise misparse as YAML mapping indicators.
102112

103113
## `{{ engine_install_steps }}`
104114

@@ -504,7 +514,7 @@ Should be replaced with the domain the AWF-sandboxed agent uses to reach MCPG on
504514

505515
The 1ES target uses the same template markers as standalone, plus the 1ES-specific `extends:` / `stages:` / `templateContext` wrapping. The 1ES template includes `templateContext.type: buildJob` for all jobs, and the pool is specified at the top-level `parameters.pool` rather than per-job.
506516

507-
Both targets share the same execution model (Copilot CLI + AWF + MCPG) and the same set of template markers.
517+
Both targets share the same execution model (Copilot CLI + AWF + MCPG) and the same set of template markers. The 1ES template additionally uses `{{ agent_display_name }}` for the `templateContext.buildJob.displayName` property (see above).
508518

509519
## Job/Stage Template Markers
510520

0 commit comments

Comments
 (0)