How to configured ubuntu vm as agent in ci/cd pipeline

Sheepu Kumar 0 Reputation points
2024-03-28T12:36:54.96+00:00

I have created a DevTestLab environment and a vm of image type ubuntu20.4.
I want to use this vm in CI pipline to execute certain unit Test Case.
Currently I am using Ubuntu20.4 as vmImage to run/execute Unit Test in yml Pipeline, I want to use New DevTest Lab Vm.

What are the setting I have to done with new VM or in yml ci pipeline to execute the Test case.

Existing Code:

stages:
- stage: Build
  displayName: Build
  condition:  not(eq(variables['Build.Reason'], 'Schedule'))
  jobs:
  - job: Job_1
    displayName: Agent job 1
    timeoutInMinutes: 60 # how long to run the job before automatically cancelling    

    pool:
      vmImage: ubuntu-20.04

    steps:
    - checkout: self

New Code:

 jobs:
  - job: Job_1
    displayName: Agent job 1
    timeoutInMinutes: 60 # how long to run the job before automatically cancelling    

    pool:
      vmImage: 'devlabVM'


Can someone help me on this issue.

Azure DevTest Labs
Azure DevTest Labs
An Azure service that is used for provisioning development and test environments.
255 questions
{count} votes