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: articles/deployment-environments/tutorial-deploy-environments-in-cicd-azure-devops.md
+34-17Lines changed: 34 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
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.
4
4
author: RoseHJM
5
5
ms.author: rosemalcolm
6
6
ms.service: deployment-environments
@@ -12,7 +12,7 @@ ms.date: 02/26/2024
12
12
13
13
# Tutorial: Deploy environments in CI/CD by using Azure Pipelines
14
14
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.
16
16
17
17
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.
18
18
@@ -36,7 +36,7 @@ In this tutorial, you learn how to:
36
36
- An Azure DevOps subscription.
37
37
-[Create an account for free](https://azure.microsoft.com/services/devops/?WT.mc_id=A261C142F).
38
38
- An Azure DevOps organization and project.
39
-
- Azure Deployment Environments
39
+
- Azure Deployment Environments.
40
40
-[Dev center and project](./quickstart-create-and-configure-devcenter.md).
41
41
-[Sample catalog](https://github.com/Azure/deployment-environments) attached to the dev center.
42
42
@@ -47,7 +47,7 @@ In this tutorial, you learn how to:
47
47
1. In **Import a repository**, select **Import**.
48
48
1. In **Import a Git repository**, select or enter the following:
1. Confirm that the environment type was added by checking your Azure portal notifications.
89
89
90
90
91
-
## Configure service connection
91
+
## Configure a service connection
92
92
93
93
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.
94
94
@@ -111,9 +111,9 @@ In Azure Pipelines, you create a *service connection* in your Azure DevOps proje
111
111
1. In the Azure portal, copy the **Display name** value.
112
112
You use this value in the next step to grant permissions for running load tests to the service principal.
113
113
114
-
### Grant access to ADE project
114
+
### Grant access to an ADE project
115
115
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.
117
117
118
118
1. In the [Azure portal](https://portal.azure.com/), go to your ADE project.
119
119
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
129
129
130
130
Edit the `azure-pipelines.yml` file in your Azure Repos repository to customize your pipeline.
131
131
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
+
132
140
1. In your Azure DevOps project, select **Repos** > **Files**.
133
141
1. In the **Files** pane, from the `.ado` folder, select `azure-pipelines.yml` file.
134
142
1. In the `azure-pipelines.yml` file, edit the existing content with the following code:
135
143
- Replace `<AzureServiceConnectionName>` with the name of the service connection you created earlier.
136
144
- In the `Inline script`, replace each of the following placeholders with values appropriate to your Azure environment:
137
145
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. |
146
154
147
155
1. Select **Commit** to save your changes.
148
156
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.
158
166
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**.
159
167
160
168
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.
0 commit comments