Skip to content

Commit 39cae17

Browse files
Merge pull request #222547 from RoseHJM/dtl-maint-cicd
DTL content freshness work - CI/CD
2 parents ee3af5b + f40ed60 commit 39cae17

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

articles/devtest-labs/devtest-lab-integrate-ci-cd.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn how to integrate Azure DevTest Labs into Azure Pipelines cont
44
ms.topic: how-to
55
ms.author: rosemalcolm
66
author: RoseHJM
7-
ms.date: 11/16/2021
7+
ms.date: 12/28/2021
88
---
99

1010
# Integrate DevTest Labs into Azure Pipelines
@@ -91,13 +91,24 @@ Write-Host "##vso[task.setvariable variable=labVMFqdn;]$labVMFqdn"
9191
Next, create the release pipeline in Azure Pipelines. The pipeline tasks use the values you assigned to the VM when you created the ARM template.
9292

9393
1. From your Azure DevOps Services project page, select **Pipelines** > **Releases** from the left navigation.
94-
1. Select **Create release**.
94+
1. Select **New pipeline**.
95+
1. In the **Select a template** pane, select **Empty job**.
96+
1. Close the **Stage** pane.
9597
1. On the **New release pipeline** page, select the **Variables** tab.
9698
1. Select **Add**, and enter the following **Name** and **Value** pairs, selecting **Add** after adding each one.
9799
- *vmName*: The VM name you assigned in the ARM template.
98100
- *userName*: The username to access the VM.
99101
- *password*: Password for the username. Select the lock icon to hide and secure the password.
100102

103+
### Add an artifact
104+
105+
1. On the new release pipeline page, on the **Pipeline** tab, select **Add an artifact**.
106+
1. On the **Add an artifact pane**, select **Azure Repo**.
107+
1. In the **Project** list, select your DevOps project.
108+
1. In the **Source (repository)** list, select your source repo.
109+
1. In the **Default branch** list, select the branch to check out.
110+
1. Select **Add**.
111+
101112
### Create a DevTest Labs VM
102113

103114
The next step creates a golden image VM to use for future deployments. This step uses the **Azure DevTest Labs Create VM** task.
@@ -112,8 +123,9 @@ The next step creates a golden image VM to use for future deployments. This step
112123
> [!NOTE]
113124
> For information about creating a more restricted permissions connection to your Azure subscription, see [Azure Resource Manager service endpoint](/azure/devops/pipelines/library/service-endpoints#sep-azure-resource-manager).
114125
- **Lab**: Select your DevTest Labs lab name.
126+
- **Virtual Machine Name**: the variable you specified for your virtual machine name: *$vmName*.
115127
- **Template**: Browse to and select the template file you checked in to your project repository.
116-
- **Parameters File**: Browse to and select the parameters file you checked in to your repository.
128+
- **Parameters File**: If you checked a parameters file into your repository, browse to and select it.
117129
- **Parameter Overrides**: Enter `-newVMName '$(vmName)' -userName '$(userName)' -password (ConvertTo-SecureString -String '$(password)' -AsPlainText -Force)`.
118130
- Drop down **Output Variables**, and under **Reference name**, enter the variable for the created lab VM ID. If you use the default *labVmId*, you can refer to the variable in subsequent tasks as **$(labVmId)**.
119131

@@ -123,7 +135,7 @@ The next step creates a golden image VM to use for future deployments. This step
123135

124136
Next, the pipeline runs the script you created to collect the details of the DevTest Labs VM.
125137

126-
1. On the release pipeline **Pipeline** tab, select the hyperlinked text in **Stage 1**, and then select the plus sign **+** next to **Agent job**.
138+
1. On the release pipeline **Tasks** tab, select the plus sign **+** next to **Agent job**.
127139
1. Under **Add tasks** in the right pane, search for and select **Azure PowerShell**, and select **Add**.
128140
1. In the left pane, select the **Azure PowerShell script: FilePath** task.
129141
1. In the right pane, fill out the form as follows:
@@ -138,7 +150,7 @@ The script collects the required values and stores them in environment variables
138150

139151
The next task creates an image of the newly deployed VM in your lab. You can use the image to create copies of the VM on demand to do developer tasks or run tests.
140152

141-
1. On the release pipeline **Pipeline** tab, select the hyperlinked text in **Stage 1**, and then select the plus sign **+** next to **Agent job**.
153+
1. On the release pipeline **Tasks** tab, select the plus sign **+** next to **Agent job**.
142154
1. Under **Add tasks**, select **Azure DevTest Labs Create Custom Image**, and select **Add**.
143155
1. In the left pane, select the **Azure DevTest Labs Create Custom Image** task.
144156
1. In the right pane, fill out the form as follows:
@@ -159,7 +171,7 @@ The tasks you usually use to deploy apps are **Azure File Copy** and **PowerShel
159171

160172
The final task is to delete the VM that you deployed in your lab. You'd ordinarily delete the VM after you do the developer tasks or run the tests that you need on the deployed VM.
161173

162-
1. On the release pipeline **Pipeline** tab, select the hyperlinked text in **Stage 1**, and then select the plus sign **+** next to **Agent job**.
174+
1. On the release pipeline **Tasks** tab, select the plus sign **+** next to **Agent job**.
163175
1. Under **Add tasks**, select **Azure DevTest Labs Delete VM**, and select **Add**.
164176
1. Configure the task as follows:
165177
- **Azure RM Subscription**: Select your service connection or subscription.

0 commit comments

Comments
 (0)