Skip to content

Commit 0c6066b

Browse files
author
RoseHJM
committed
Adding more explanation and links.
1 parent 0597043 commit 0c6066b

File tree

1 file changed

+34
-17
lines changed

1 file changed

+34
-17
lines changed

articles/deployment-environments/tutorial-deploy-environments-in-cicd-azure-devops.md

Lines changed: 34 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: 'Tutorial: Deploy environments with Azure Pipelines'
3-
description: Learn how to integrate Azure Deployment Environments into your CI/CD pipeline by using Azure DevOps.
3+
description: Learn how to integrate Azure Deployment Environments into your Azure Pipelines CI/CD pipeline and streamline your software development process.
44
author: RoseHJM
55
ms.author: rosemalcolm
66
ms.service: deployment-environments
@@ -12,7 +12,7 @@ ms.date: 02/26/2024
1212

1313
# Tutorial: Deploy environments in CI/CD by using Azure Pipelines
1414

15-
In this tutorial, you learn how to integrate Azure Deployment Environments into your Azure DevOps CI/CD pipeline.
15+
In this tutorial, you will learn how to integrate Azure Deployment Environments (ADE) into your Azure Pipelines CI/CD pipeline.
1616

1717
Continuous integration and continuous delivery (CI/CD) is a software development approach that helps teams to automate the process of building, testing, and deploying software changes. CI/CD enables you to release software changes more frequently and with greater confidence.
1818

@@ -36,7 +36,7 @@ In this tutorial, you learn how to:
3636
- An Azure DevOps subscription.
3737
- [Create an account for free](https://azure.microsoft.com/services/devops/?WT.mc_id=A261C142F).
3838
- An Azure DevOps organization and project.
39-
- Azure Deployment Environments
39+
- Azure Deployment Environments.
4040
- [Dev center and project](./quickstart-create-and-configure-devcenter.md).
4141
- [Sample catalog](https://github.com/Azure/deployment-environments) attached to the dev center.
4242

@@ -47,7 +47,7 @@ In this tutorial, you learn how to:
4747
1. In **Import a repository**, select **Import**.
4848
1. In **Import a Git repository**, select or enter the following:
4949
- **Repository type**: Git
50-
- **Clone URL**: https://github.com/Azure/deployment-environments.
50+
- **Clone URL**: https://github.com/Azure/deployment-environments
5151

5252

5353
## Configure environment types
@@ -88,7 +88,7 @@ Create project environment types:
8888
1. Confirm that the environment type was added by checking your Azure portal notifications.
8989

9090

91-
## Configure service connection
91+
## Configure a service connection
9292

9393
In Azure Pipelines, you create a *service connection* in your Azure DevOps project to access resources in your Azure subscription. When you create the service connection, Azure DevOps creates a Microsoft Entra service principal object.
9494

@@ -111,9 +111,9 @@ In Azure Pipelines, you create a *service connection* in your Azure DevOps proje
111111
1. In the Azure portal, copy the **Display name** value.
112112
You use this value in the next step to grant permissions for running load tests to the service principal.
113113

114-
### Grant access to ADE project
114+
### Grant access to an ADE project
115115

116-
Azure Deployment Environments uses Azure RBAC to grant permissions for performing specific activities on your ADE resource. To make changes from a CI/CD pipeline, you grant the Deployment Environments User role to the service principal.
116+
Azure Deployment Environments uses role-based access control to grant permissions for performing specific activities on your ADE resource. To make changes from a CI/CD pipeline, you grant the Deployment Environments User role to the service principal.
117117

118118
1. In the [Azure portal](https://portal.azure.com/), go to your ADE project.
119119
1. Select **Access control (IAM)** > **Add** > **Add role assignment**.
@@ -129,20 +129,28 @@ You can now use the service connection in your Azure Pipelines workflow definiti
129129

130130
Edit the `azure-pipelines.yml` file in your Azure Repos repository to customize your pipeline.
131131

132+
In the pipeline, you define the steps to create the environment. In this pipeline, you define the steps to create the environment as a job, which is a series of steps that run sequentially as a unit.
133+
134+
To customize the pipeline you:
135+
- Specify the Service Connection to use, and The pipeline uses the Azure CLI to create the environment.
136+
- Use an Inline script to run an Azure CLI command that creates the environment.
137+
138+
The Azure CLI is a command-line tool that provides a set of commands for working with Azure resources. To discover more Azure CLI commands, see [az devcenter](https://learn.microsoft.com/en-us/cli/azure/devcenter?view=azure-cli-latest).
139+
132140
1. In your Azure DevOps project, select **Repos** > **Files**.
133141
1. In the **Files** pane, from the `.ado` folder, select `azure-pipelines.yml` file.
134142
1. In the `azure-pipelines.yml` file, edit the existing content with the following code:
135143
- Replace `<AzureServiceConnectionName>` with the name of the service connection you created earlier.
136144
- In the `Inline script`, replace each of the following placeholders with values appropriate to your Azure environment:
137145

138-
| Placeholder | Value |
139-
| ------------------------------- | ----- |
140-
| `<dev-center-name>` | The name of your dev center. |
141-
| `<project-name>` | The name of your project. |
142-
| `<catalog-name>` | The name of your catalog. |
143-
| `<environment-definition-name>` | Do not change. Defines the environment type that is used. |
144-
| `<environment-name>` | The name of the environment. |
145-
| `<parameters>` | Do not change. References the json file that defines parameters for the environment. |
146+
| Placeholder | Value |
147+
| ------------------------------- | ----- |
148+
| `<dev-center-name>` | The name of your dev center. |
149+
| `<project-name>` | The name of your project. |
150+
| `<catalog-name>` | The name of your catalog. |
151+
| `<environment-definition-name>` | Do not change. Defines the environment type that is used. |
152+
| `<environment-name>` | The name of the environment. |
153+
| `<parameters>` | Do not change. References the json file that defines parameters for the environment. |
146154

147155
1. Select **Commit** to save your changes.
148156
1. In the **Commit changes** pane, enter a commit message, and then select **Commit**.
@@ -158,11 +166,20 @@ Next, you run the pipeline to create the ADE environment.
158166
1. You can also check the progress of the environment creation in the Azure portal by selecting your dev center, selecting your project, and then selecting **Environments**.
159167

160168

169+
You can insert this job anywhere in a Continuous Integration (CI) and/or a Continuous Delivery (CD) pipeline. Get started with the [Azure Pipelines documentation](https://docs.microsoft.com/azure/devops/pipelines/?view=azure-devops) to learn more about creating and managing pipelines.
170+
161171
## Clean up resources
162172

163-
[!INCLUDE [alt-delete-resource-group](includes/alt-delete-resource-group.md)]
173+
When you're done with the resources you created in this tutorial, you can delete them to avoid incurring charges.
174+
175+
Use the following command to delete the environment you created in this tutorial:
176+
177+
```azurecli
178+
az devcenter dev environment delete --dev-center <DevCenterName> --project-name <DevCenterProjectName> --name <DeploymentEnvironmentInstanceToCreateName> --yes
179+
```
164180

165181
## Related content
166182

183+
- [Install the devcenter Azure CLI extension](how-to-install-devcenter-cli-extension.md)
167184
- [Create and access an environment by using the Azure CLI](how-to-create-access-environments.md)
168-
- For complete command listings, see the [Microsoft Dev Box and Azure Deployment Environments Azure CLI documentation](https://aka.ms/CLI-reference)
185+
- [Microsoft Dev Box and Azure Deployment Environments Azure CLI documentation](https://aka.ms/CLI-reference)

0 commit comments

Comments
 (0)