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
Copy file name to clipboardExpand all lines: docs/pipelines/ecosystems/containers/publish-to-acr.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -255,6 +255,26 @@ To use Managed Service Identity with Azure Pipelines to publish Docker images to
255
255
256
256
:::image type="content" source="../media/acr-service-connection.png" alt-text="A screenshot showing how to set up a docker registry service connection.":::
257
257
258
+
### [Workload Identity Federation](#tab/wif)
259
+
260
+
1. From your project, select the gear icon  to navigate to your **Project settings**.
261
+
262
+
1. Select **Service connections** from the left pane.
263
+
264
+
1. Select **New service connection**, and then select **Docker Registry** then **Next**.
265
+
266
+
1. Select **Azure Container Registry**, and then select *Workload Identity federation* as your **Authentication Type**.
267
+
268
+
1. Select your **Subscription** from the dropdown menu.
269
+
270
+
1. Select your **Azure container registry** from the list.
271
+
272
+
1. Enter a name for your service connection.
273
+
274
+
1. Select **Save** when you are done.
275
+
276
+
:::image type="content" source="../media/docker-wif-connection.png" alt-text="A screenshot showing how to set up a docker registry service connection for workload identity federation.":::
Copy file name to clipboardExpand all lines: docs/pipelines/ecosystems/containers/push-image.md
+7-2Lines changed: 7 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,9 @@ To learn how to build a container image to deploy with Azure Pipelines, see [Bui
23
23
24
24
You'll use the [Docker@2 task](/azure/devops/pipelines/tasks/reference/docker-v2) to build or push Docker images, login or logout, start or stop containers, or run a Docker command.
25
25
26
-
The task uses a [Docker registry service connection](../../library/service-endpoints.md#docker-registry-service-connection) to log in and push to a container registry. The process for creating a Docker registry service connection differs depending on your registry.
26
+
The task uses a [Docker registry service connection for Azure Container Registry](../../library/service-endpoints.md#azure-container-registry) to log in and push to a container registry. The process for creating a Docker registry service connection differs depending on your registry.
27
+
28
+
27
29
28
30
The Docker registry service connection stores credentials to the container registry before pushing the image. You can also directly reference service connections in Docker without an additional script task.
29
31
@@ -35,6 +37,9 @@ You'll need to follow a different process to create a service connection for Azu
35
37
36
38
With the Azure Container Registry option, the subscription (associated with the Microsoft Entra identity of the user signed into Azure DevOps) and container registry within the subscription are used to create the service connection.
37
39
40
+
> [!NOTE]
41
+
> This service connection method uses a service principal and not workload identity federation for authentication. To learn how to use workload identity instead with Azure Container Registry, see [Manage service connections for Azure Container Registry](/azure/devops/pipelines/library/service-endpoints#azure-container-registry).
42
+
38
43
When you create a new pipeline for a repository that contains a Dockerfile, Azure Pipelines will detect Dockerfile in the repository. To start this process, create a new pipeline and select the repository with your Dockerfile.
39
44
40
45
1. From the **Configure** tab, select the **Docker - Build and push an image to Azure Container Registry** task.
@@ -60,7 +65,7 @@ For a more detailed overview, see [Build and Push to Azure Container Registry do
60
65
61
66
#### [Docker Hub](#tab/docker)
62
67
63
-
Choose the Docker Hub option under [Docker registry service connection](../../library/service-endpoints.md#docker-registry-service-connection) and provide your username and password to create a Docker service connection.
68
+
Choose the Docker Hub option under [Docker registry service connection](../../library/service-endpoints.md#docker-hub-or-others) and provide your username and password to create a Docker service connection.
1. Go to **Project settings** > **Pipelines** > **Service connections** in the Azure DevOps menu.
65
-
1. Create a [Docker registry service connection](../../library/service-endpoints.md#docker-registry-service-connection) associated with your container registry. Name it **azure-pipelines-canary-k8s**.
65
+
1. Create a [Docker registry service connection](../../library/service-endpoints.md#azure-container-registry) associated with your container registry. Name it **azure-pipelines-canary-k8s**.
66
66
1. Create a [Kubernetes service connection](../../library/service-endpoints.md#kubernetes-service-connection) for the Kubernetes cluster and namespace you want to deploy to. Name it **azure-pipelines-canary-k8s**.
67
67
68
-
69
68
> [!NOTE]
70
69
> If you're using Azure Kubernetes Service, the [Azure Resource Manager service connection type](../../library/service-endpoints.md#azure-resource-manager-service-connection) is the best way to connect to a private cluster, or a cluster that has local accounts disabled.
71
70
@@ -374,7 +373,7 @@ You can deploy a stable version with YAML or Classic.
374
373
For the first run of the pipeline the stable version of the workloads, and their baseline or canary versions don't exist in the cluster. To deploy the stable version:
375
374
376
375
1. In *app/app.py*, change `success_rate = 5` to `success_rate = 10`. This change triggers the pipeline, leading to a build and push of the image to the container registry. It will also trigger the `DeployCanary` stage.
377
-
1. Because you configured an approval on the `akspromote` environment, the release will wait before running that stage.
376
+
1. Because you configured an approval on the `akspromote` environment, the release waits before running that stage.
378
377
1. In the summary of the run, select **Review** > **Approve**. This deploys the stable version of the workloads (the `sampleapp` deployment in *manifests/deployment.yml*) to the namespace.
Copy file name to clipboardExpand all lines: docs/pipelines/library/service-endpoints.md
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -204,7 +204,7 @@ Once you've [created your service connection](#create-a-service-connection), com
204
204
205
205
---
206
206
207
-
1. Authorize the service connection using one of the following techniques:
207
+
2. Authorize the service connection using one of the following techniques:
208
208
209
209
* To authorize any pipeline to use the service connection, go to Azure Pipelines, open the Settings page, select Service connections, and enable the setting **Allow all pipelines to use this connection** option for the connection.
210
210
@@ -369,18 +369,17 @@ Use the following parameters to define and secure a connection to a Docker host.
369
369
370
370
For more information about protecting your connection to the Docker host, see [Protect the Docker daemon socket](https://docs.docker.com/engine/security/https/).
371
371
372
-
### Docker Registry service connection
373
-
374
-
Use the following parameters to define a connection to a container registry for either [Azure Container Registry](#azure-container-registry) or [Docker Hub or others](#docker-hub-or-others).
375
-
376
372
#### Azure Container Registry
377
373
378
374
| Parameter | Description |
379
375
| --------- | ----------- |
376
+
| Authentication type | Required. The options are workload identity federation, managed service identity, or service principal. |
380
377
| Connection name | Required. The name you use to refer to the service connection in task inputs. |
381
378
| Azure subscription | Required. The Azure subscription containing the container registry to be used for service connection creation. |
382
379
| Azure Container Registry | Required. The Azure Container Registry to be used for creation of service connection. |
383
380
381
+
There are three options for authenticating with Azure Container Registry - workload identity federation, managed service identity, or a service principal. For more information about what tasks work with workload identity federation connections, see [Troubleshoot a workload identity service connection](../release/troubleshoot-workload-identity.md).
Copy file name to clipboardExpand all lines: docs/pipelines/release/troubleshoot-workload-identity.md
+20-19Lines changed: 20 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ description: Learn how to troubleshoot an Azure Resource Manager workload identi
5
5
ms.topic: troubleshooting-general
6
6
ms.author: jukullam
7
7
author: juliakm
8
-
ms.date: 02/08/2024
8
+
ms.date: 06/07/2024
9
9
monikerRange: '>= azure-devops'
10
10
"recommendations": "true"
11
11
---
@@ -27,7 +27,7 @@ The following sections describe the issues and how to resolve them.
27
27
28
28
### Review pipeline tasks
29
29
30
-
Not all pipelines tasks support workload identity. Specifically, only Azure Resource Manager service connection properties on tasks use workload identity federation. The table below lists workload identity federation support for [tasks included with Azure DevOps](/azure/devops/pipelines/tasks/reference/?view=azure-pipelines). For tasks installed from the [Marketplace](https://marketplace.visualstudio.com/search?target=AzureDevOps&category=Azure%20Pipelines&visibilityQuery=all&sortBy=Installs), contact the extension publisher for support.
30
+
Not all pipelines tasks support workload identity. Specifically, only Azure Resource Manager service connection properties on tasks use workload identity federation. The table below lists workload identity federation support for [tasks included with Azure DevOps](/azure/devops/pipelines/tasks/reference/?view=azure-pipelines&preserve-view=true). For tasks installed from the [Marketplace](https://marketplace.visualstudio.com/search?target=AzureDevOps&category=Azure%20Pipelines&visibilityQuery=all&sortBy=Installs), contact the extension publisher for support.
@@ -50,8 +50,8 @@ Not all pipelines tasks support workload identity. Specifically, only Azure Reso
50
50
| AzureFunctionApp@2 | Y |
51
51
| AzureFunctionAppContainer@1 | Y |
52
52
| AzureFunctionOnKubernetes@0 | Use AzureFunctionOnKubernetes@1 |
53
-
| AzureFunctionOnKubernetes@1 | Azure service connection: Y<br/> Docker Registry service connection: 2024 Q3 <br/>[Use Azure service connection instead of Kubernetes service connection](https://devblogs.microsoft.com/devops/service-connection-guidance-for-aks-customers-using-kubernetes-tasks/)|
54
-
| AzureIoTEdge@2 | Azure service connection: Y<br/> Docker Registry service connection: 2024 Q3 <br/>[Use Azure service connection instead of Kubernetes service connection](https://devblogs.microsoft.com/devops/service-connection-guidance-for-aks-customers-using-kubernetes-tasks/)|
53
+
| AzureFunctionOnKubernetes@1 | Azure service connection: Y<br/> Docker Registry service connection: Y|
54
+
| AzureIoTEdge@2 | Azure service connection: Y<br/> Docker Registry service connection: Y|
55
55
| AzureKeyVault@1 | Y |
56
56
| AzureKeyVault@2 | Y |
57
57
| AzureMonitor@0 | Use AzureMonitor@1 |
@@ -65,31 +65,32 @@ Not all pipelines tasks support workload identity. Specifically, only Azure Reso
65
65
| AzurePowerShell@5 | Y |
66
66
| AzureResourceGroupDeployment@2 | Y |
67
67
| AzureResourceManagerTemplateDeployment@3 | Y |
68
-
| AzureRmWebAppDeployment@3 | Azure service connection: Y<br/> Docker Registry service connection: N|
68
+
| AzureRmWebAppDeployment@3 | Azure service connection: Y<br/> Docker Registry service connection: Y|
69
69
| AzureRmWebAppDeployment@4 | Y |
70
70
| AzureSpringCloud@0 | Y |
71
71
| AzureVmssDeployment@0 | Y |
72
72
| AzureWebApp@1 | Y |
73
73
| AzureWebAppContainer@1 | Y |
74
-
| ContainerBuild@0 | 2024 Q3 |
75
-
| ContainerStructureTest@0 | 2024 Q3 |
76
-
| Docker@0 | Azure service connection: Y<br/> Docker Registry service connection: N |
77
-
| Docker@1 | Azure service connection: Y<br/> Docker Registry service connection: 2024 Q3 |
78
-
| Docker@2 | 2024 Q3 |
79
-
| DockerCompose@0 | Azure service connection: Y<br/> Docker Registry service connection: 2024 Q3 |
80
-
| HelmDeploy@0 | Azure service connection: Y<br/>[Use Azure service connection instead of Kubernetes service connection](https://devblogs.microsoft.com/devops/service-connection-guidance-for-aks-customers-using-kubernetes-tasks/)|
74
+
| ContainerBuild@0 | N |
75
+
| ContainerStructureTest@0 | N |
76
+
| Docker@0 | Azure service connection: Y<br/> Docker Registry service connection: Y |
77
+
| Docker@1 | Azure service connection: Y<br/> Docker Registry service connection: N |
78
+
| Docker@2 | Y |
79
+
| Docker@0 | Azure service connection: Y<br/> Docker Registry service connection: Y |
80
+
| DockerCompose@0 | Azure service connection: Y<br/> Docker Registry service connection: Y |
81
+
| HelmDeploy@0 | Azure service connection: Y |
81
82
| InvokeRESTAPI@1 | Y |
82
83
| JavaToolInstaller@0 | Y |
83
84
| JenkinsDownloadArtifacts@1 | Y |
84
85
| Kubernetes@0 | Use Kubernetes@1 |
85
-
| Kubernetes@1 | Azure service connection: Y<br/> Docker Registry service connection: 2024 Q3 <br/>[Use Azure service connection instead of Kubernetes service connection](https://devblogs.microsoft.com/devops/service-connection-guidance-for-aks-customers-using-kubernetes-tasks/)|
86
+
| Kubernetes@1 | Azure service connection: Y<br/> Docker Registry service connection: Y|
86
87
| KubernetesManifest@0 | Use KubernetesManifest@1 |
87
-
| KubernetesManifest@1 | Azure service connection: Y<br/> Docker Registry service connection: 2024 Q3 <br/>[Use Azure service connection instead of Kubernetes service connection](https://devblogs.microsoft.com/devops/service-connection-guidance-for-aks-customers-using-kubernetes-tasks/)|
0 commit comments