Muokkaa

Jaa


AzureCloudPowerShellDeployment@1 - Azure Cloud Service deployment v1 task

Deploy an Azure Cloud Service.

This task is deprecated because Azure Cloud Services is being retired, see Migrate Azure Cloud Services (classic) to Azure Cloud Services (extended support).

Deploy an Azure Cloud Service.

Syntax

# 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.
# 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.
# 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.

Inputs

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

The Azure subscription to target for deployment.


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

Enables or disables ARM storage support.


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

The storage account must exist prior to deployment.


StorageAccount - Storage account
string. Required.

The storage account must exist prior to deployment.


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

The ARM subscription.


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

A pre-existing ARM storage account.


ServiceName - Service name
string. Required.

An existing cloud service name.


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.


CsPkg - CsPkg
string. Required.

Path to the CsPkg in the default artifact directory.


CsCfg - CsCfg
string. Required.

The CsCfg path in the default artifact directory.


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

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


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).


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

Appends current date and time to the deployment label.


AllowUpgrade - Allow upgrade
boolean. Default value: true.

Allows an upgrade to the Microsoft Azure deployment.


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.


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.


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

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


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

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

NewServiceAdditionalArguments - Additional arguments
string.

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


NewServiceAffinityGroup - Affinity group
string.

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


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

None.

Remarks

Use this task to deploy an Azure Cloud Service.

Requirements

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