Skip to content

Latest commit

 

History

History
434 lines (354 loc) · 16 KB

azure-cloud-powershell-deployment-v1.md

File metadata and controls

434 lines (354 loc) · 16 KB
title description ms.date monikerRange
AzureCloudPowerShellDeployment@1 - Azure Cloud Service deployment v1 task
Deploy an Azure Cloud Service (task version 1).
05/14/2024
<=azure-pipelines

AzureCloudPowerShellDeployment@1 - Azure Cloud Service deployment v1 task

:::moniker range="<=azure-pipelines"

Deploy an Azure Cloud Service.

[!INCLUDE workload-identity]

:::moniker-end

Syntax

:::moniker range=">=azure-pipelines-2020"

# Azure Cloud Service deployment v1
# Deploy an Azure Cloud Service.
- task: AzureCloudPowerShellDeployment@1
  inputs:
    azureClassicSubscription: # string. Alias: ConnectedServiceName. Required. Azure subscription (Classic). 
    #EnableAdvancedStorageOptions: false # boolean. Enable ARM storage support. Default: false.
    StorageAccount: # string. Required when EnableAdvancedStorageOptions = false. Storage account (Classic). 
    #ARMConnectedServiceName: # string. Required when EnableAdvancedStorageOptions = true. Azure subscription (ARM). 
    #ARMStorageAccount: # string. Required when EnableAdvancedStorageOptions = true. Storage account (ARM). 
    ServiceName: # string. Required. Service name. 
    ServiceLocation: # string. Required. Service location. 
    CsPkg: # string. Required. CsPkg. 
    CsCfg: # string. Required. CsCfg. 
    slotName: 'Production' # string. Alias: Slot. Required. Environment (Slot). Default: Production.
    #DeploymentLabel: '$(Build.BuildNumber)' # string. Deployment label. Default: $(Build.BuildNumber).
    #AppendDateTimeToLabel: false # boolean. Append current date and time. Default: false.
    #AllowUpgrade: true # boolean. Allow upgrade. Default: true.
    #SimultaneousUpgrade: false # boolean. Optional. Use when AllowUpgrade == true. Simultaneous upgrade. Default: false.
    #ForceUpgrade: false # boolean. Optional. Use when AllowUpgrade == true. Force upgrade. Default: false.
    #VerifyRoleInstanceStatus: false # boolean. Verify role instance status. Default: false.
  # Advanced Options For Creating New Service
    #DiagnosticStorageAccountKeys: # string. Diagnostic storage account keys. 
    #NewServiceCustomCertificates: # string. Custom certificates to import. 
    #NewServiceAdditionalArguments: # string. Additional arguments. 
    #NewServiceAffinityGroup: # string. Affinity group.

:::moniker-end

:::moniker range="=azure-pipelines-2019.1"

# Azure Cloud Service deployment v1
# Deploy an Azure Cloud Service.
- task: AzureCloudPowerShellDeployment@1
  inputs:
    azureClassicSubscription: # string. Alias: ConnectedServiceName. Required. Azure subscription (Classic). 
    StorageAccount: # string. Required. Storage account. 
    ServiceName: # string. Required. Service name. 
    ServiceLocation: # string. Required. Service location. 
    CsPkg: # string. Required. CsPkg. 
    CsCfg: # string. Required. CsCfg. 
    slotName: 'Production' # string. Alias: Slot. Required. Environment (Slot). Default: Production.
    #DeploymentLabel: '$(Build.BuildNumber)' # string. Deployment label. Default: $(Build.BuildNumber).
    #AppendDateTimeToLabel: false # boolean. Append current date and time. Default: false.
    #AllowUpgrade: true # boolean. Allow upgrade. Default: true.
    #SimultaneousUpgrade: false # boolean. Optional. Use when AllowUpgrade == true. Simultaneous upgrade. Default: false.
    #ForceUpgrade: false # boolean. Optional. Use when AllowUpgrade == true. Force upgrade. Default: false.
    #VerifyRoleInstanceStatus: false # boolean. Verify role instance status. Default: false.
  # Advanced Options For Creating New Service
    #DiagnosticStorageAccountKeys: # string. Diagnostic storage account keys. 
    #NewServiceCustomCertificates: # string. Custom certificates to import. 
    #NewServiceAdditionalArguments: # string. Additional arguments. 
    #NewServiceAffinityGroup: # string. Affinity group.

:::moniker-end

:::moniker range="=azure-pipelines-2019"

# Azure Cloud Service Deployment v1
# Deploy an Azure Cloud Service.
- task: AzureCloudPowerShellDeployment@1
  inputs:
    azureClassicSubscription: # string. Alias: ConnectedServiceName. Required. Azure subscription (Classic). 
    StorageAccount: # string. Required. Storage account. 
    ServiceName: # string. Required. Service name. 
    ServiceLocation: # string. Required. Service location. 
    CsPkg: # string. Required. CsPkg. 
    CsCfg: # string. Required. CsCfg. 
    slotName: 'Production' # string. Alias: Slot. Required. Environment (Slot). Default: Production.
    #DeploymentLabel: '$(Build.BuildNumber)' # string. Deployment label. Default: $(Build.BuildNumber).
    #AppendDateTimeToLabel: false # boolean. Append current date and time. Default: false.
    #AllowUpgrade: true # boolean. Allow upgrade. Default: true.
    #SimultaneousUpgrade: false # boolean. Optional. Use when AllowUpgrade == true. Simultaneous upgrade. Default: false.
    #ForceUpgrade: false # boolean. Optional. Use when AllowUpgrade == true. Force upgrade. Default: false.
    #VerifyRoleInstanceStatus: false # boolean. Verify role instance status. Default: false.
  # Advanced Options For Creating New Service
    #DiagnosticStorageAccountKeys: # string. Diagnostic storage account keys. 
    #NewServiceCustomCertificates: # string. Custom certificates to import. 
    #NewServiceAdditionalArguments: # string. Additional arguments. 
    #NewServiceAffinityGroup: # string. Affinity group.

:::moniker-end

Inputs

:::moniker range="<=azure-pipelines"

azureClassicSubscription - Azure subscription (Classic)
Input alias: ConnectedServiceName. string. Required.

The Azure subscription to target for deployment.


:::moniker-end

:::moniker range=">=azure-pipelines-2020"

EnableAdvancedStorageOptions - Enable ARM storage support
boolean. Default value: false.

Enables or disables ARM storage support.


:::moniker-end

:::moniker range=">=azure-pipelines-2020"

StorageAccount - Storage account (Classic)
string. Required when EnableAdvancedStorageOptions = false.

The storage account must exist prior to deployment.


:::moniker-end

:::moniker range="<=azure-pipelines-2019.1"

StorageAccount - Storage account
string. Required.

The storage account must exist prior to deployment.


:::moniker-end

:::moniker range=">=azure-pipelines-2020"

ARMConnectedServiceName - Azure subscription (ARM)
string. Required when EnableAdvancedStorageOptions = true.

The ARM subscription.


:::moniker-end

:::moniker range=">=azure-pipelines-2020"

ARMStorageAccount - Storage account (ARM)
string. Required when EnableAdvancedStorageOptions = true.

A pre-existing ARM storage account.


:::moniker-end

:::moniker range="<=azure-pipelines"

ServiceName - Service name
string. Required.

An existing cloud service name.


:::moniker-end

:::moniker range="<=azure-pipelines"

ServiceLocation - Service location
string. Required.

A region for new service deployment. Options include: East US, East US 2, Central US, South Central US, West US, North Europe, West Europe, and others.


:::moniker-end

:::moniker range="<=azure-pipelines"

CsPkg - CsPkg
string. Required.

Path to the CsPkg in the default artifact directory.


:::moniker-end

:::moniker range="<=azure-pipelines"

CsCfg - CsCfg
string. Required.

The CsCfg path in the default artifact directory.


:::moniker-end

:::moniker range="<=azure-pipelines"

slotName - Environment (Slot)
Input alias: Slot. string. Required. Default value: Production.

Set this value to 'Staging' or use the default.


:::moniker-end

:::moniker range="<=azure-pipelines"

DeploymentLabel - Deployment label
string. Default value: $(Build.BuildNumber).

Specifies the label name for the new deployment. If not specified, defaults to a Globally Unique Identifier (GUID).


:::moniker-end

:::moniker range="<=azure-pipelines"

AppendDateTimeToLabel - Append current date and time
boolean. Default value: false.

Appends current date and time to the deployment label.


:::moniker-end

:::moniker range="<=azure-pipelines"

AllowUpgrade - Allow upgrade
boolean. Default value: true.

Allows an upgrade to the Microsoft Azure deployment.


:::moniker-end

:::moniker range=">=azure-pipelines-2019"

SimultaneousUpgrade - Simultaneous upgrade
boolean. Optional. Use when AllowUpgrade == true. Default value: false.

Upgrades all instances at once. Your cloud service is unavailable during this time.


:::moniker-end

:::moniker range="<=azure-pipelines"

ForceUpgrade - Force upgrade
boolean. Optional. Use when AllowUpgrade == true. Default value: false.

Sets a forced upgrade. Forcing an upgrade can cause loss of local data.


:::moniker-end

:::moniker range=">=azure-pipelines-2019"

VerifyRoleInstanceStatus - Verify role instance status
boolean. Default value: false.

Causes the task to wait until role instances are in the ready state.


:::moniker-end

:::moniker range="<=azure-pipelines"

DiagnosticStorageAccountKeys - Diagnostic storage account keys
string.

Format storage key string as Role:Storagekey. The diagnostics storage account name for each role is retrieved from the diagnostic config file (.wadcfgx).

  • If the .wadcfgx file for a role is not found: The diagnostic extension isn't set for that role.
  • If the storage account name is not found in the .wadcfgx file: The default storage account is used for storing diagnostic results, and storage key parameters from the deployment task is ignored.

NOTE: If there is sensitive information in the diagnostic results for your environment, save the storage_account_key as a secret variable. For example:

  • WebRole: WebRole_storage_account_key
  • WorkerRole: WorkerRole_stoarge_account_key

:::moniker-end

:::moniker range=">=azure-pipelines-2019"

NewServiceCustomCertificates - Custom certificates to import
string.

Format the custom certificate string as CertificatePfxBase64:CertificatePassword. Save the certificate_password as a secret variable. For example:

  • Certificate1: Certificate1_password
  • Certificate2: Certificate2_password

:::moniker-end

:::moniker range="<=azure-pipelines"

NewServiceAdditionalArguments - Additional arguments
string.

Passes additional arguments when creating a new service. Arguments are passed to the New-AzureService cmdlet. For example, -Label 'MyTestService'.


:::moniker-end

:::moniker range="<=azure-pipelines"

NewServiceAffinityGroup - Affinity group
string.

The affinity group used instead of service location when creating a new service.


:::moniker-end

Task control options

All tasks have control options in addition to their task inputs. For more information, see Control options and common task properties.

Output variables

:::moniker range="<=azure-pipelines"

None.

:::moniker-end

Remarks

Use this task to deploy an Azure Cloud Service.

Requirements

:::moniker range="<=azure-pipelines"

Requirement Description
Pipeline types YAML, Classic build, Classic release
Runs on Agent
Demands Self-hosted agents must have capabilities that match the following demands to run jobs that use this task: azureps
Capabilities This task does not satisfy any demands for subsequent tasks in the job.
Command restrictions Any
Settable variables Any
Agent version 1.103.0 or greater
Task category Deploy

:::moniker-end