DevTestLabs YAML - rfennell/AzurePipelines GitHub Wiki

DevTest Lab Tasks

The 'DevTest Lab Tasks' package contains the following tasks. The table show the possible variables that can be used in YAML Azure DevOps Pipeline configurations

DevTestLabsStartVm V1

[Deprecated] Consider using the AzureCLI@2 task and the 'az lab vm' to start a DevTest Labs VM

YAML snippet

# Start a DevTest Labs VM
# Description - [Deprecated] Consider using the AzureCLI@2 task and the 'az lab vm' to start a DevTest Labs VM
- task: DevTestLabsStartVm@1
  inputs: 
     # Required arguments
     ConnectedServiceName: 
     LabVMId: $(labVMId)

Arguments

  • Argument: ConnectedServiceName
    • Description: Azure Resource Manager subscription to configure before running.
    • Type: connectedService:AzureRM
    • Required: true
    • Default (if defined):
  • Argument: LabVMId
    • Description: Resource ID of the lab VM to start. Default is $(labVMId). You can use any variable such as $(labVMId), which is the output of calling Create Azure DevTest Labs VM, that contains a value in the form /subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualMachines/{vmName}. See Wiki for details
    • Type: string
    • Required: true
    • Default (if defined): $(labVMId)

DevTestLabsStopVm V1

[Deprecated] Consider using the AzureCLI@2 task and the 'az lab vm' to stop a DevTest Labs VM

YAML snippet

# Stop a DevTest Labs VM
# Description - [Deprecated] Consider using the AzureCLI@2 task and the 'az lab vm' to stop a DevTest Labs VM
- task: DevTestLabsStopVm@1
  inputs: 
     # Required arguments
     ConnectedServiceName: 
     LabVMId: $(labVMId)

Arguments

  • Argument: ConnectedServiceName
    • Description: Azure Resource Manager subscription to configure before running.
    • Type: connectedService:AzureRM
    • Required: true
    • Default (if defined):
  • Argument: LabVMId
    • Description: Resource ID of the lab VM to stop. Default is $(labVMId). You can use any variable such as $(labVMId), which is the output of calling Create Azure DevTest Labs VM, that contains a value in the form /subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualMachines/{vmName}. See Wiki for details
    • Type: string
    • Required: true
    • Default (if defined): $(labVMId)