Skip to content

Commit 1d231a0

Browse files
Learn Build Service GitHub AppLearn Build Service GitHub App
authored andcommitted
2 parents 3a41f29 + 35a009e commit 1d231a0

File tree

6 files changed

+53
-29
lines changed

6 files changed

+53
-29
lines changed

docs/pipelines/ecosystems/containers/publish-to-acr.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,26 @@ To use Managed Service Identity with Azure Pipelines to publish Docker images to
255255
256256
:::image type="content" source="../media/acr-service-connection.png" alt-text="A screenshot showing how to set up a docker registry service connection.":::
257257
258+
### [Workload Identity Federation](#tab/wif)
259+
260+
1. From your project, select the gear icon ![gear icon](../../../media/icons/gear-icon.png) 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.":::
277+
258278
* * *
259279
260280
## Build and publish to Azure Container Registry

docs/pipelines/ecosystems/containers/push-image.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ To learn how to build a container image to deploy with Azure Pipelines, see [Bui
2323

2424
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.
2525

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+
2729

2830
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.
2931

@@ -35,6 +37,9 @@ You'll need to follow a different process to create a service connection for Azu
3537

3638
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.
3739

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+
3843
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.
3944

4045
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
6065

6166
#### [Docker Hub](#tab/docker)
6267

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.
6469

6570
#### [Google Container Registry](#tab/google)
6671

docs/pipelines/ecosystems/kubernetes/canary-demo.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,9 @@ helm install --name sampleapp prometheus-community/kube-prometheus-stack
6262
## Create service connections
6363

6464
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**.
6666
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**.
6767

68-
6968
> [!NOTE]
7069
> 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.
7170
@@ -374,7 +373,7 @@ You can deploy a stable version with YAML or Classic.
374373
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:
375374

376375
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.
378377
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.
379378

380379
### [Classic](#tab/classic/)
51.6 KB
Loading

docs/pipelines/library/service-endpoints.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ Once you've [created your service connection](#create-a-service-connection), com
204204

205205
---
206206

207-
1. Authorize the service connection using one of the following techniques:
207+
2. Authorize the service connection using one of the following techniques:
208208

209209
* 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.
210210

@@ -369,18 +369,17 @@ Use the following parameters to define and secure a connection to a Docker host.
369369

370370
For more information about protecting your connection to the Docker host, see [Protect the Docker daemon socket](https://docs.docker.com/engine/security/https/).
371371

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-
376372
#### Azure Container Registry
377373

378374
| Parameter | Description |
379375
| --------- | ----------- |
376+
| Authentication type | Required. The options are workload identity federation, managed service identity, or service principal. |
380377
| Connection name | Required. The name you use to refer to the service connection in task inputs. |
381378
| Azure subscription | Required. The Azure subscription containing the container registry to be used for service connection creation. |
382379
| Azure Container Registry | Required. The Azure Container Registry to be used for creation of service connection. |
383380

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).
382+
384383
#### Docker Hub or others
385384

386385
| Parameter | Description |

docs/pipelines/release/troubleshoot-workload-identity.md

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn how to troubleshoot an Azure Resource Manager workload identi
55
ms.topic: troubleshooting-general
66
ms.author: jukullam
77
author: juliakm
8-
ms.date: 02/08/2024
8+
ms.date: 06/07/2024
99
monikerRange: '>= azure-devops'
1010
"recommendations": "true"
1111
---
@@ -27,7 +27,7 @@ The following sections describe the issues and how to resolve them.
2727

2828
### Review pipeline tasks
2929

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.
3131

3232
| Task | Workload identity federation support |
3333
|------------------------------------------|---------------------------------------------------------------------------------------------------------------|
@@ -50,8 +50,8 @@ Not all pipelines tasks support workload identity. Specifically, only Azure Reso
5050
| AzureFunctionApp@2 | Y |
5151
| AzureFunctionAppContainer@1 | Y |
5252
| 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 |
5555
| AzureKeyVault@1 | Y |
5656
| AzureKeyVault@2 | Y |
5757
| AzureMonitor@0 | Use AzureMonitor@1 |
@@ -65,31 +65,32 @@ Not all pipelines tasks support workload identity. Specifically, only Azure Reso
6565
| AzurePowerShell@5 | Y |
6666
| AzureResourceGroupDeployment@2 | Y |
6767
| 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 |
6969
| AzureRmWebAppDeployment@4 | Y |
7070
| AzureSpringCloud@0 | Y |
7171
| AzureVmssDeployment@0 | Y |
7272
| AzureWebApp@1 | Y |
7373
| 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 |
8182
| InvokeRESTAPI@1 | Y |
8283
| JavaToolInstaller@0 | Y |
8384
| JenkinsDownloadArtifacts@1 | Y |
8485
| 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 |
8687
| 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/) |
88-
| Notation@0 | Y |
89-
| PackerBuild@0 | Use PackerBuild@1 |
90-
| PackerBuild@1 | Y |
91-
| PublishToAzureServiceBus@1 | Use PublishToAzureServiceBus@2 |
92-
| PublishToAzureServiceBus@2 | Y |
88+
| KubernetesManifest@1 | Azure service connection: Y<br/> Docker Registry service connection: Y |
89+
| Notation@0 | 2024 |
90+
| PackerBuild@0 | 2024 |
91+
| PackerBuild@1 | 2024 |
92+
| PublishToAzureServiceBus@1 | PublishToAzureServiceBus@2 will support workload identity federation |
93+
| PublishToAzureServiceBus@2 | 2024 Q2 |
9394
| ServiceFabricComposeDeploy@0 | N |
9495
| ServiceFabricDeploy@1 | N |
9596
| SqlAzureDacpacDeployment@1 | Y |

0 commit comments

Comments
 (0)