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
Authentication details (`serviceConnection`, `resourceGroup`, `subscription`) have been moved from individual registry endpoints into a centralized `RegistryAuthentication` list.
23
+
This fixes an issue where ACR authentication could fail when multiple service connections existed for the same registry.
24
+
25
+
**Before:** Each registry endpoint embedded its own authentication:
26
+
27
+
```yaml
28
+
publishConfig:
29
+
BuildRegistry:
30
+
server: $(acr.server)
31
+
repoPrefix: "my-prefix/"
32
+
resourceGroup: $(resourceGroup)
33
+
subscription: $(subscription)
34
+
serviceConnection:
35
+
name: $(serviceConnectionName)
36
+
id: $(serviceConnection.id)
37
+
clientId: $(serviceConnection.clientId)
38
+
tenantId: $(tenant)
39
+
PublishRegistry:
40
+
server: $(acr.server)
41
+
repoPrefix: "publish/"
42
+
resourceGroup: $(resourceGroup)
43
+
subscription: $(subscription)
44
+
serviceConnection:
45
+
name: $(publishServiceConnectionName)
46
+
id: $(publishServiceConnection.id)
47
+
clientId: $(publishServiceConnection.clientId)
48
+
tenantId: $(tenant)
49
+
```
50
+
51
+
**After:** Registry endpoints only contain `server` and `repoPrefix`. Authentication is centralized:
52
+
53
+
```yaml
54
+
publishConfig:
55
+
BuildRegistry:
56
+
server: $(acr.server)
57
+
repoPrefix: "my-prefix/"
58
+
PublishRegistry:
59
+
server: $(acr.server)
60
+
repoPrefix: "publish/"
61
+
RegistryAuthentication:
62
+
- server: $(acr.server)
63
+
resourceGroup: $(resourceGroup)
64
+
subscription: $(subscription)
65
+
serviceConnection:
66
+
name: $(serviceConnectionName)
67
+
id: $(serviceConnection.id)
68
+
clientId: $(serviceConnection.clientId)
69
+
tenantId: $(tenant)
70
+
```
71
+
72
+
How to update:
73
+
- Update any publishConfig parameters to match the new structure.
74
+
- Multiple registries can share authentication. If two registries use the same ACR server, only one entry is needed in `RegistryAuthentication`.
75
+
- The new structure should match [ImageBuilder's Configuration Model](https://github.com/dotnet/docker-tools/tree/a82572386854f15af441c50c6efa698a627e9f2b/src/ImageBuilder/Configuration).
76
+
- Update service connection setup (if using `setup-service-connections.yml`):
77
+
- The template now supports looking up service connections from `publishConfig.RegistryAuthentication`
78
+
- Use the new `usesRegistries` parameter to specify which registries need auth setup:
Copy file name to clipboardExpand all lines: eng/docker-tools/DEV-GUIDE.md
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -180,14 +180,16 @@ The `stages` variable is a comma-separated string that controls which pipeline s
180
180
```yaml
181
181
variables:
182
182
- name: stages
183
-
value: "build,test,publish"# Run all stages
183
+
value: "build,test,sign,publish"# Run all stages
184
184
```
185
185
186
186
Common patterns:
187
-
- `"build"` - Build only, no tests or publishing
188
-
- `"build,test"` - Build and test, but don't publish
187
+
- `"build"` - Build only, no tests, signing, or publishing
188
+
- `"build,test"` - Build and test, but don't sign or publish
189
+
- `"build,test,sign"` - Build, test, and sign, but don't publish
190
+
- `"sign"` - Sign only (when re-running failed signing from a previous build)
189
191
- `"publish"` - Publish only (when re-running a failed publish from a previous build)
190
-
- `"build,test,publish"` - Full pipeline
192
+
- `"build,test,sign,publish"` - Full pipeline
191
193
192
194
**Note:** The `Post_Build` stage is implicitly included whenever `build` is in the stages list. You don't need to specify it separately—it automatically runs after Build to merge image info files and consolidate SBOMs.
193
195
@@ -372,11 +374,13 @@ Note: For simple retries of failed jobs, use the Azure Pipelines UI "Re-run fail
372
374
373
375
| Scenario | stages | sourceBuildPipelineRunId |
374
376
|----------|--------|--------------------------|
375
-
| Normal full build | `"build,test,publish"` | `$(Build.BuildId)` (default) |
377
+
| Normal full build | `"build,test,sign,publish"` | `$(Build.BuildId)` (default) |
376
378
| Re-run publish after infra fix | `"publish"` | ID of the successful build run |
377
379
| Re-test after infra fix | `"test"` | ID of the build run to test |
380
+
| Re-sign after infra fix | `"sign"` | ID of the build run to sign |
378
381
| Build only (no publish) | `"build"` | `$(Build.BuildId)` (default) |
379
382
| Test + publish (skip build) | `"test,publish"` | ID of the build run |
383
+
| Sign + publish (skip build/test) | `"sign,publish"` | ID of the build run |
0 commit comments