Deploy: Azure CLI

Last Update: 4/7/2017

Team Services

icon Run a shell or batch script containing Azure CLI commands against an Azure subscription.

This task is used to run Azure CLI commands on cross-platform agents running on Windows, Linux or Mac operating systems.

The task is under development. If you encounter problems, or wish to share feedback about the task and features you would like to see, please contact us.

Demands

  • none

Prerequisites

Arguments

Argument Description
Azure Connection Type

Required. Select the type of service endpoint used to define the connection to Azure. Choose Azure Classic or Azure Resource Manager.

Azure Classic Subscription

Required if you select Azure Classic for the Azure Connection Type parameter. The name of an Azure Classic service endpoint configured for the subscription where the target Azure service, virtual machine, or storage account is located.

Azure RM Subscription

Required if you select Azure Resource Manager for the Azure Connection Type parameter. The name of an Azure Resource Manager service endpoint configured for the subscription where the target Azure service, virtual machine, or storage account is located. See Azure Resource Manager overview for more details.

Script Location

Required. The way that the script is provided. Choose Inline Script or Script Path (the default).

Inline Script

Required if you select Inline Script for the Script Location parameter. Type or copy the script code to execute here. You can include default variables, global variables, and environment variables.

Script Path

Required if you select Script Path for the Script Location parameter. The path to a linked artifact that is the .bat, .cmd, or .sh script you want to run. It can be a fully-qualified path, or a valid path relative to the default working directory.

Arguments

Optional. Any arguments you want to pass to the script.

Advanced options
Working Directory

Optional. The working directory in which the script will execute. If not specified, this will be the folder containing the script file.

Fail on Standard Error

Set this option if you want the build to fail if errors are written to the StandardError stream.

Control options

Q&A

Do I need a build agent?

You need at least one agent to run your build. Get an agent.

I can't select a default agent queue and I can't queue my build. How do I fix this?

See queues.

I use Team Foundation Server on-premises and I don't see some of these features. Why not?

Some of these features are available only on Visual Studio Team Services and not yet available on-premises. Some features are available on-premises if you have upgraded to the latest version of TFS.

Help and support