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
{{ message }}
This repository was archived by the owner on Jan 21, 2026. It is now read-only.
Copy file name to clipboardExpand all lines: Instructions/Labs/AZ400_M11_Configuring_Pipelines_as_Code_with_YAML.md
+20-16Lines changed: 20 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,10 +80,12 @@ In this task, you will create an Azure web app and an Azure SQL database by usin
80
80
>**Note**: If this is the first time you are starting **Cloud Shell** and you are presented with the **You have no storage mounted** message, select the subscription you are using in this lab, and select **Create storage**.
81
81
82
82
1. From the **Bash** prompt, in the **Cloud Shell** pane, run the following command to create a resource group (replace the `<region>` placeholder with the name of the Azure region closest to you such as 'eastus').
83
-
83
+
84
84
```bash
85
-
RESOURCEGROUPNAME='az400m11l01-RG'
86
85
LOCATION='<region>'
86
+
```
87
+
```bash
88
+
RESOURCEGROUPNAME='az400m11l01-RG'
87
89
az group create --name $RESOURCEGROUPNAME --location $LOCATION
88
90
```
89
91
@@ -178,22 +180,29 @@ In this task, you will add a YAML build definition to the existing project.
178
180
179
181
1. On the **Where is your code?** pane, click **Azure Repos Git (YAML)** option.
180
182
1. On the **Select a repository** pane, click **PartsUnlimited**.
181
-
2. On the **Configure your pipeline** pane, click **ASP<nolink>.NET** to use this template as the starting point for your pipeline. This will open the **Review your pipeline YAML** pane.
183
+
1. On the **Configure your pipeline** pane, click **ASP<nolink>.NET** to use this template as the starting point for your pipeline. This will open the **Review your pipeline YAML** pane.
182
184
183
185
>**Note**: The pipeline definition will be saved as a file named **azure-pipelines.yml**in the root of the repository. The file will contain the steps required to build and test a typical ASP<nolink>.NET solution. You can also customize the build as needed. In this scenario, you will update the **pool** to enforce the use of a VM running Visual Studio 2017.
184
186
185
-
3. Make sure `trigger` is **master**.
187
+
1. Make sure `trigger` is **master**.
186
188
187
189
>**Note**: Review in Repos if your repository has **master** or **main** branch, organizations could choose default branch name for new repos: [Change the default branch](https://docs.microsoft.com/en-us/azure/devops/repos/git/change-default-branch?view=azure-devops#choosing-a-name).
188
190
189
-
4. On the **Review your pipeline YAML** pane, in line **10**, replace `vmImage: 'windows-latest'` with `vmImage: 'vs2017-win2016'`.
190
-
5. On the **Review your pipeline YAML** pane, click **Save and run**.
191
-
6. On the **Save and run** pane, accept the default settings and click **Save and run**.
192
-
7. On the pipeline run pane, in the **Jobs** section, click **Job** and monitor its progress and verify that it completes successfully.
191
+
1. On the **Review your pipeline YAML** pane, in line **10**, replace `vmImage: 'windows-latest'` with `vmImage: 'windows-2019'`.
192
+
1. Remove the **VSTest@2** task:
193
+
```yaml
194
+
- task: VSTest@2
195
+
inputs:
196
+
platform: '$(buildPlatform)'
197
+
configuration: '$(buildConfiguration)'
198
+
```
199
+
1. On the **Review your pipeline YAML** pane, click **Save and run**.
200
+
1. On the **Save and run** pane, accept the default settings and click **Save and run**.
201
+
1. On the pipeline run pane, in the **Jobs** section, click **Job** and monitor its progress and verify that it completes successfully.
193
202
194
203
>**Note**: Each task from the YAML file is available for review, including any warnings and errors.
195
204
196
-
8. Return to the pipeline run pane, switch from the **Summary** tab to the **Tests** tab, and review test statistics.
205
+
1. Return to the pipeline run pane, switch from the **Summary** tab to the **Tests** tab, and review test statistics.
197
206
198
207
#### Task 3: Add continuous delivery to the YAML definition
199
208
@@ -285,7 +294,7 @@ In this task, you will add continuous delivery to the YAML-based definition of t
285
294
jobs:
286
295
- job: Build
287
296
pool:
288
-
vmImage: 'vs2017-win2016'
297
+
vmImage: 'windows-2019'
289
298
290
299
variables:
291
300
solution: '**/*.sln'
@@ -306,11 +315,6 @@ In this task, you will add continuous delivery to the YAML-based definition of t
0 commit comments