Azure Cloud Service Deployment task

Azure DevOps Services

Use this task to deploy an Azure Cloud Service.

YAML snippet

# Azure Cloud Service deployment
# Deploy an Azure Cloud Service
- task: AzureCloudPowerShellDeployment@1
  inputs:
    azureClassicSubscription: 
    #storageAccount: # Required when enableAdvancedStorageOptions == False
    serviceName: 
    serviceLocation: 
    csPkg: 
    csCfg: 
    #slotName: 'Production' 
    #deploymentLabel: '$(Build.BuildNumber)' # Optional
    #appendDateTimeToLabel: false # Optional
    #allowUpgrade: true 
    #simultaneousUpgrade: false # Optional
    #forceUpgrade: false # Optional
    #verifyRoleInstanceStatus: false # Optional
    #diagnosticStorageAccountKeys: # Optional
    #newServiceCustomCertificates: # Optional
    #newServiceAdditionalArguments: # Optional
    #newServiceAffinityGroup: # Optional
    #enableAdvancedStorageOptions: false 
    #aRMConnectedServiceName: # Required when enableAdvancedStorageOptions == True
    #aRMStorageAccount: # Required when enableAdvancedStorageOptions == True

Arguments

Argument Description
ConnectedServiceName
Azure subscription (Classic)
(Required) Azure Classic subscription to target for deployment.
Argument alias: azureClassicSubscription
EnableAdvancedStorageOptions
Enable Azure Resource Manager storage support
(Required) Select to enable Azure Resource Manager storage support for this task
StorageAccount
Storage account (Classic)
(Required) Storage account must exist prior to deployment.
ARMConnectedServiceName
Azure subscription (Azure Resource Manager)
(Required) Azure Resource Manager subscription
ARMStorageAccount
Storage account (Azure Resource Manager)
(Required) Choose a pre-existing Azure Resource Manager storage account
ServiceName
Service name
(Required) Select or enter an existing cloud service name.
ServiceLocation
Service location
(Required) Select a region for new service deployment.Possible options are East US, East US 2, Central US, South Central US, West US, North Europe, West Europe and others.
CsPkg
CsPkg
(Required) Path of CsPkg under the default artifact directory.
CsCfg
CsCfg
(Required) Path of CsCfg under the default artifact directory.
Slot
Environment (Slot)
(Required) Production or Staging
Default value: Production
Argument alias: slotName
DeploymentLabel
Deployment label
(Optional) Specifies the label name for the new deployment. If not specified, a Globally Unique Identifier (GUID) is used.
Default value: $(Build.BuildNumber)
AppendDateTimeToLabel
Append current date and time
(Optional) Appends current date and time to deployment label
Default value: false
AllowUpgrade
Allow upgrade
(Required) When selected allows an upgrade to the Microsoft Azure deployment
Default value: true
SimultaneousUpgrade
Simultaneous upgrade
(Optional) Updates all instances at once. Your cloud service will be unavailable during update.
Default value: false
ForceUpgrade
Force upgrade
(Optional) When selected sets the upgrade to a forced upgrade, which could potentially cause loss of local data.
Default value: false
VerifyRoleInstanceStatus
Verify role instance status
When selected then the task will wait until role instances are in ready state
DiagnosticStorageAccountKeys
Diagnostic storage account keys
(Optional) Provide storage keys for diagnostics storage account in Role:Storagekey format. The diagnostics storage account name for each role will be obtained from diagnostics config file (.wadcfgx). If the .wadcfgx file for a role is not found, diagnostics extensions won’t be set for the role. If the storage account name is missing in the .wadcfgx file, the default storage account will be used for storing diagnostics results and the storage key parameters from deployment task will be ignored. It’s recommended to save <storage_account_key> as a secret variable unless there is no sensitive information in the diagnostics result for your stage.
For example, WebRole: <WebRole_storage_account_key>
WorkerRole: <WorkerRole_storage_account_key>
NewServiceCustomCertificates
Custom certificates to import
(Optional) Provide custom certificates in CertificatePfxBase64:CertificatePassword format. It’s recommended to save <certificate_password> as a secret variable.
For example, Certificate1: <Certificate1_password>
Certificate2: <Certificate2_password>
NewServiceAdditionalArguments
Additional arguments
(Optional) Pass in additional arguments while creating a brand new service. These will be passed on to New-AzureService cmdlet. Eg: -Label 'MyTestService'
NewServiceAffinityGroup
Affinity group
(Optional) While creating new service, this affinity group will be considered instead of using service location.

Open source

This task is open source on GitHub. Feedback and contributions are welcome.