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.
13
+
This fixes an issue where ACR authentication could fail when multiple service connections existed for the same registry.
14
+
15
+
**Before:** Each registry endpoint embedded its own authentication:
16
+
17
+
```yaml
18
+
publishConfig:
19
+
BuildRegistry:
20
+
server: $(acr.server)
21
+
repoPrefix: "my-prefix/"
22
+
resourceGroup: $(resourceGroup)
23
+
subscription: $(subscription)
24
+
serviceConnection:
25
+
name: $(serviceConnectionName)
26
+
id: $(serviceConnection.id)
27
+
clientId: $(serviceConnection.clientId)
28
+
tenantId: $(tenant)
29
+
PublishRegistry:
30
+
server: $(acr.server)
31
+
repoPrefix: "publish/"
32
+
resourceGroup: $(resourceGroup)
33
+
subscription: $(subscription)
34
+
serviceConnection:
35
+
name: $(publishServiceConnectionName)
36
+
id: $(publishServiceConnection.id)
37
+
clientId: $(publishServiceConnection.clientId)
38
+
tenantId: $(tenant)
39
+
```
40
+
41
+
**After:** Registry endpoints only contain `server` and `repoPrefix`. Authentication is centralized:
42
+
43
+
```yaml
44
+
publishConfig:
45
+
BuildRegistry:
46
+
server: $(acr.server)
47
+
repoPrefix: "my-prefix/"
48
+
PublishRegistry:
49
+
server: $(acr.server)
50
+
repoPrefix: "publish/"
51
+
RegistryAuthentication:
52
+
- server: $(acr.server)
53
+
resourceGroup: $(resourceGroup)
54
+
subscription: $(subscription)
55
+
serviceConnection:
56
+
name: $(serviceConnectionName)
57
+
id: $(serviceConnection.id)
58
+
clientId: $(serviceConnection.clientId)
59
+
tenantId: $(tenant)
60
+
```
61
+
62
+
How to update:
63
+
- Update any publishConfig parameters to match the new structure.
64
+
- Multiple registries can share authentication. If two registries use the same ACR server, only one entry is needed in `RegistryAuthentication`.
65
+
- The new structure should match [ImageBuilder's Configuration Model](https://github.com/dotnet/docker-tools/tree/a82572386854f15af441c50c6efa698a627e9f2b/src/ImageBuilder/Configuration).
66
+
- Update service connection setup (if using `setup-service-connections.yml`):
67
+
- The template now supports looking up service connections from `publishConfig.RegistryAuthentication`
68
+
- Use the new `usesRegistries` parameter to specify which registries need auth setup:
0 commit comments