@@ -11,10 +11,10 @@ GitHub / GHCR at run time:
1111| 4 | AWF + MCPG container images | ` ghcr.io/github/... ` |
1212
1313The optional ` supply-chain: ` front-matter section reroutes these fetches to an
14- ** internal Azure DevOps Artifacts feed** (for the binaries # 1 – # 3 ) and/or an
15- ** internal container registry ** (for the images # 4 ). This is intended for
16- supply-chain-hardened environments where the build agent pool cannot reach
17- GitHub / GHCR.
14+ ** internal Azure DevOps Artifacts feed** or one exact ** Azure DevOps pipeline
15+ artifact ** (for the binaries # 1 – # 3 ), and/or an ** internal container registry **
16+ (for the images # 4 ). This is intended for supply-chain-hardened environments
17+ where the build agent pool cannot reach GitHub / GHCR.
1818
1919When ` supply-chain: ` is omitted, the generated pipeline is byte-for-byte
2020identical to before — there is no behavioural change for existing agents.
@@ -26,6 +26,12 @@ supply-chain:
2626 feed : # mirrors binaries #1, #2, #3
2727 name : my-project/my-feed # feed name or "project/feed"
2828 service-connection : feed-conn # optional (see Authentication)
29+ # Alternative to feed (the two are mutually exclusive):
30+ # pipeline-artifact:
31+ # project: AgentPlayground
32+ # definition-id: 2560
33+ # run-id: 630001
34+ # artifact: ado-aw-candidate
2935 registry : # mirrors images #4
3036 name : myacr.azurecr.io/mirror # registry host or base path
3137 service-connection : acr-conn # required when registry is set
@@ -35,10 +41,12 @@ supply-chain:
3541| Field | Type | Required | Purpose |
3642|-------|------|----------|---------|
3743| ` feed` | scalar **or** `{ name, service-connection }` | optional | Enables the binary mirror (#1–#3). A bare string is shorthand for `{ name: <string> }`. |
38- | `registry` | scalar **or** `{ name, service-connection }` | optional | Enables the image mirror (#4). |
39- | `service-connection` | string | optional | Shared fallback connection used by whichever target does not declare its own. |
44+ | `pipeline-artifact` | `{ project, definition-id, run-id, artifact }` | optional | Uses one exact producer run as the complete binary source (#1–#3). Mutually exclusive with `feed`. |
45+ | `registry` | scalar **or** `{ name, service-connection }` | optional | Enables the image mirror (#4), independently of either binary source. |
46+ | `service-connection` | string | optional | Shared fallback connection for `feed` and `registry`; it does not apply to `pipeline-artifact`. |
4047
41- ` feed` and `registry` are **independent** — set either, both, or neither.
48+ ` feed` and `pipeline-artifact` are mutually exclusive. `registry` is
49+ independent and may accompany either binary source.
4250
4351# ## Scalar shorthand
4452
@@ -71,6 +79,28 @@ role and `NuGetAuthenticate@1` authenticates automatically via
7179` $(System.AccessToken)` . Set a `service-connection` only for cross-org or
7280external feeds.
7381
82+ # ## Pipeline artifact (binaries)
83+
84+ The pipeline-artifact source is immutable configuration : the generated
85+ `DownloadPipelineArtifact@2` tasks always use `source : specific`,
86+ `runVersion : specific`, the configured project, definition ID (`pipeline`),
87+ run ID (`runId`), and artifact name. The compiler never selects latest runs,
88+ tags, or triggering pipelines.
89+
90+ ` project` must be an Azure DevOps project name or canonical GUID;
91+ ` definition-id` and `run-id` must be positive integers; and `artifact` follows
92+ Azure DevOps artifact-name rules. The current build identity must have
93+ permission to read the configured project, pipeline run, and artifact.
94+ The producer must be in the same Azure DevOps organization; cross-organization
95+ pipeline-artifact downloads are not supported by this source.
96+ ` supply-chain.service-connection` is not used for this source, and no
97+ ` NuGetAuthenticate@1` step is emitted.
98+
99+ With an exact run ID, the artifact is consumable as soon as its publish task
100+ has completed even if later jobs keep the producer run active. Consumers
101+ queued before the named artifact exists fail; producers should confirm artifact
102+ visibility before queueing them.
103+
74104# ## Registry (images)
75105
76106The image mirror authenticates with `az acr login` (`AzureCLI@2`) using the
@@ -96,7 +126,7 @@ used by `permissions:`), passed to `AzureCLI@2` as `azureSubscription`.
96126> ` registry.name ` to the canonical ` *.azurecr.io ` login server so the derived
97127> registry name is correct.
98128
99- ## What the feed and registry must contain
129+ ## What the binary source and registry must contain
100130
101131Versions stay ** pinned by the generating compiler** — the internal mirror must
102132host the exact pinned versions. A mirror that is a few days behind is fine: use
@@ -119,6 +149,47 @@ payload, so the package simply needs to carry the same files (and matching
119149` sha256sum -c checksums.txt ` is preserved** , so the mirror must ship the
120150matching ` checksums.txt ` .
121151
152+ ### Pipeline artifact
153+
154+ The single configured artifact is a complete source and must contain exactly
155+ one file with each of these names (directory nesting is allowed):
156+
157+ - ` ado-aw-linux-x64 `
158+ - ` awf-linux-x64 `
159+ - ` ado-script.zip `
160+ - ` checksums.txt `
161+ - ` provenance.json `
162+
163+ ` checksums.txt ` must have exactly one standard sha256sum entry for each payload,
164+ with the exact filename. Each consumer locates its payload plus the shared
165+ manifest and provenance document, verifies the exact checksum entry, then
166+ preserves the normal chmod/move/unzip/PATH behavior.
167+
168+ ` provenance.json ` must be a JSON object using this Phase 1 contract:
169+
170+ ``` json
171+ {
172+ "schema" : " ado-aw/candidate-artifact/1" ,
173+ "producer_definition_id" : 2560 ,
174+ "producer_build_id" : 630001 ,
175+ "repository" : " githubnext/ado-aw" ,
176+ "source_ref" : " refs/heads/main" ,
177+ "source_version" : " 0123456789abcdef0123456789abcdef01234567" ,
178+ "reason" : " IndividualCI" ,
179+ "compiler_version" : " 0.45.1" ,
180+ "awf_version" : " 0.27.32"
181+ }
182+ ```
183+
184+ The required identity fields are exactly ` schema ` , ` producer_definition_id ` ,
185+ and ` producer_build_id ` ; both producer IDs are JSON numbers. Compilation embeds
186+ the configured IDs, and every consumer fails closed if the schema or either
187+ producer ID is missing, non-numeric, or mismatched. ` repository ` , ` source_ref ` ,
188+ ` source_version ` , ` reason ` , ` compiler_version ` , and ` awf_version ` are optional
189+ diagnostic fields: when present, the generated step includes them in the
190+ validated, non-secret provenance output. Their absence does not invalidate an
191+ otherwise valid artifact.
192+
122193### Registry images
123194
124195` registry.name ` is a registry ** host or base path** — teams generally cannot
@@ -175,6 +246,31 @@ supply-chain:
175246 feed: my-internal-feed
176247` ` `
177248
249+ All binaries from one exact candidate pipeline run :
250+
251+ ` ` ` yaml
252+ supply-chain:
253+ pipeline-artifact:
254+ project: AgentPlayground
255+ definition-id: 2560
256+ run-id: 630001
257+ artifact: ado-aw-candidate
258+ ` ` `
259+
260+ Candidate binaries plus mirrored images :
261+
262+ ` ` ` yaml
263+ supply-chain:
264+ pipeline-artifact:
265+ project: AgentPlayground
266+ definition-id: 2560
267+ run-id: 630001
268+ artifact: ado-aw-candidate
269+ registry:
270+ name: myacr.azurecr.io
271+ service-connection: acr-conn
272+ ` ` `
273+
178274Images only :
179275
180276` ` ` yaml
@@ -186,9 +282,10 @@ supply-chain:
186282
187283# # Network isolation note
188284
189- The mirror fetches (`NuGetAuthenticate@1`, `DownloadPackage@1`, `docker pull`,
190- ` az acr login` ) run as ordinary ADO steps on the build agent — **outside** the
191- AWF network-isolation sandbox, which wraps only the copilot agent command.
285+ The mirror fetches (`NuGetAuthenticate@1`, `DownloadPackage@1`,
286+ ` DownloadPipelineArtifact@2` , `docker pull`, `az acr login`) run as ordinary
287+ ADO steps on the build agent — **outside** the AWF network-isolation sandbox,
288+ which wraps only the copilot agent command.
192289Consequently :
193290
194291- The feed/registry hosts are **not** added to the agent's AWF
0 commit comments