Azure Pipelines Tasks

repository·master·Indexed 25 days ago

https://github.com/microsoft/azure-pipelines-tasks

Official tasks for the Azure Pipelines build system and Team Foundation Server (TFS). This library provides out-of-the-box functionality and serves as an open reference for developers creating custom tasks. Includes detailed documentation for the Azure CLI task, covering cross-platform execution on Windows, Linux, and macOS, version selection between AZ CLI 1.0 and 2.0, service connection configuration for ARM and Classic resources, and security mechanisms for script argument sanitization.

Tokens
96.9K
Snippets
93
Records
486
Agent score
84%

What's inside azure-pipelines-tasks

  1. Overview of Azure File Copy task

    master

    The AzureFileCopy task is used to copy application files and artifacts (such as PowerShell scripts or DSC modules) to either an Azure Blob storage container or directly to Azure Virtual Machines.

    When copying to Azure VMs, the task uses Azure Blobs as an intermediary: files are first uploaded to an automatically generated container in an Azure storage account and then downloaded to the target VMs. The task utilizes the AzCopy command-line utility for high-speed data transfer.

  2. Overview of Azure File Copy (AzureFileCopy@4)

    master

    The AzureFileCopy@4 task copies application files and artifacts (such as PowerShell scripts or DSC modules) to either an Azure Blob storage container or directly to Azure Virtual Machines.

    When copying to Azure VMs, the task uses Azure Blobs as an intermediary: files are first uploaded to a temporary container and then downloaded to the target VMs. The task utilizes AzCopy for high-performance data transfer.

  3. Overview of Azure Web App Deployment: ARM task

    master

    The Azure Web App Deployment: ARM task is used to deploy Web Apps, Functions, and WebJobs to Azure App Service. It supports cross-platform Azure Pipelines agents (Windows, Linux, or Mac) and utilizes deployment technologies such as RunFromPackage, Zip Deploy, Containers, and Kudu REST APIs.

    Supported application types include:

    • ASP.NET
    • ASP.NET Core
    • PHP
    • Java
    • Python
    • Go
    • Node.js

    Supported Azure App Services include:

    • Function App (Windows/Linux/Containers)
    • Web App on Windows
    • Web App on Linux
    • Web App for Containers
    • Apps configured under Azure App Service Environments.
  4. Run mobile app test suites with App Center Test task

    master
    The App Center Test task allows you to execute mobile app test suites within the App Center Test cloud service. This service provides test automation for native and hybrid mobile apps across hundreds of device models and operating system configurations. It is part of the Visual Studio App Center suite, which integrates building, testing, and distributing applications.
  5. Deploy to Azure App Service (ARM)

    master

    The AzureRmWebAppDeploymentV5 task deploys web projects to existing Azure Web Apps or Function Apps using Azure Resource Manager (ARM). It supports multiple deployment technologies including Web Deploy, Kudu REST APIs, Container Registry, Zip Deploy, and RunFromPackage.

    By default, the task automatically selects the best deployment technology based on the input package, App Service type, and agent OS. For example:

    • MSBuild packages: Uses Web Deploy.
    • Web App on Linux: Uses Zip Deploy.
    • War files: Uses War Deploy.
    • Jar files: Uses Run From Zip.
    • Non-Windows agents: Uses Kudu REST APIs.
  6. Run Azure CLI commands in Azure Pipelines

    master

    The Azure CLI task allows you to execute Azure CLI commands on cross-platform agents (Windows, Linux, or macOS). It supports both Azure Resource Manager (ARM) service connections and Azure DevOps service connections.

    Key Features in Version 3.0+

    • Workload Identity Federation: Supports secure authentication for Azure DevOps connections.
    • Automatic Extension Installation: Automatically installs and configures the Azure DevOps CLI extension when using Azure DevOps service connections.
    • Tenant/Directory Level Commands: Supports authentication without selecting a specific Azure subscription by enabling the Allow no Azure subscriptions input or using an empty GUID (00000000-0000-0000-0000-000000000000) as the Subscription ID.
  7. Deploy web applications to IIS using IIS Web Application Deployment task

    master

    The IIS Web Application Deployment task deploys a web application or website to an IIS web server using Web Deploy. It supports IIS 7, 7.5, 8, and 8.5.

    Key Workflow:

    1. Ensure the web application package (zip file or folder) is available on the target machine or a reachable UNC path.
    2. Use Windows Machine File Copy (for domain-joined/workgroup machines) or Azure File Copy (for Azure VMs) to move the package to the target machine prior to running this task.
    3. Configure the task with the website name and package location to execute the deployment via the registered Deployment Group agent.
  8. Use the Notation Azure DevOps Task to sign and verify container artifacts

    master

    The Notation Azure DevOps task uses the Notation CLI to sign and verify Docker container artifacts or images.

    • Signing: The task signs the artifact's unique manifest descriptor and attaches the signature to the same repository.
    • Verifying: The task retrieves the signature from the repository and validates it against the certificate in the trust store.

    Requirements:

    • Network: Public network access is required to download the Notation CLI and the Notation Azure Key Vault plugin from GitHub releases.
    • Supported Operating Systems:
      • Linux (x64, ARM64)
      • Windows (x64)
      • macOS (x64, ARM64)
  9. Run PowerShell or PowerShell-DSC scripts on target machines

    master

    The PowerShellOnTargetMachinesV1 task executes PowerShell scripts or PowerShell-DSC scripts on remote target machines using Windows Remote Management (WinRM).

    Requirements:

    • PowerShell Scripts: Requires PowerShell 2.0 or higher on the target machine.
    • PowerShell-DSC Scripts: Requires Windows Management Framework 4.0 installed on the target machine (included by default in Windows 8.1 and Windows Server 2012 R2).
    • Connectivity: Uses WinRM to access domain-joined, workgroup, on-premises, or Azure virtual machines.