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
+16-14Lines changed: 16 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -178,22 +178,29 @@ In this task, you will add a YAML build definition to the existing project.
178
178
179
179
1. On the **Where is your code?** pane, click **Azure Repos Git (YAML)** option.
180
180
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.
181
+
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
182
183
183
>**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
184
185
-
3. Make sure `trigger` is **master**.
185
+
1. Make sure `trigger` is **master**.
186
186
187
187
>**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
188
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.
189
+
1. On the **Review your pipeline YAML** pane, in line **10**, replace `vmImage: 'windows-latest'` with `vmImage: 'windows-2019'`.
190
+
1. Remove the **VSTest@2** task:
191
+
```yaml
192
+
- task: VSTest@2
193
+
inputs:
194
+
platform: '$(buildPlatform)'
195
+
configuration: '$(buildConfiguration)'
196
+
```
197
+
1. On the **Review your pipeline YAML** pane, click **Save and run**.
198
+
1. On the **Save and run** pane, accept the default settings and click **Save and run**.
199
+
1. On the pipeline run pane, in the **Jobs** section, click **Job** and monitor its progress and verify that it completes successfully.
193
200
194
201
>**Note**: Each task from the YAML file is available for review, including any warnings and errors.
195
202
196
-
8. Return to the pipeline run pane, switch from the **Summary** tab to the **Tests** tab, and review test statistics.
203
+
1. Return to the pipeline run pane, switch from the **Summary** tab to the **Tests** tab, and review test statistics.
197
204
198
205
#### Task 3: Add continuous delivery to the YAML definition
199
206
@@ -285,7 +292,7 @@ In this task, you will add continuous delivery to the YAML-based definition of t
285
292
jobs:
286
293
- job: Build
287
294
pool:
288
-
vmImage: 'vs2017-win2016'
295
+
vmImage: 'windows-2019'
289
296
290
297
variables:
291
298
solution: '**/*.sln'
@@ -306,11 +313,6 @@ In this task, you will add continuous delivery to the YAML-based definition of t
0 commit comments