AzureCloudPowerShellDeployment@1 - Azure 雲端服務部署 v1 工作

部署 Azure 雲端服務。

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.

輸入

azureClassicSubscription - Azure 訂用帳戶 (傳統)
輸入別名: ConnectedServiceNamestring. 必要。

要以部署為目標的 Azure 訂用帳戶。


EnableAdvancedStorageOptions - 啟用 ARM 儲存體支援
boolean. 預設值:false

啟用或停用 ARM 儲存體支援。


StorageAccount - 傳統) 儲存體帳戶 (
string. 當 EnableAdvancedStorageOptions = false 時為必要。

儲存體帳戶必須在部署之前存在。


StorageAccount - 儲存體帳戶
string. 必要。

儲存體帳戶必須在部署之前存在。


ARMConnectedServiceName - Azure 訂用帳戶 (ARM)
string. 當 EnableAdvancedStorageOptions = true 時為必要。

ARM 訂用帳戶。


ARMStorageAccount - 儲存體帳戶 (ARM)
string. 當 EnableAdvancedStorageOptions = true 時為必要。

預先存在的 ARM 儲存體帳戶。


ServiceName - 服務名稱
string. 必要。

現有的雲端服務名稱。


ServiceLocation - 服務位置
string. 必要。

新服務部署的區域。 選項包括:美國東部、美國東部 2、美國中部、美國中南部、美國西部、北歐、西歐等等。


CsPkg - CsPkg
string. 必要。

預設成品目錄中 CsPkg 的路徑。


CsCfg - CsCfg
string. 必要。

預設成品目錄中的 CsCfg 路徑。


slotName - 環境 (位置)
輸入別名: Slotstring. 必要。 預設值:Production

將此值設定為 [預備] 或使用預設值。


DeploymentLabel - 部署標籤
string. 預設值:$(Build.BuildNumber)

指定新部署的標籤名稱。 如果未指定,預設為全域唯一識別碼 (GUID) 。


AppendDateTimeToLabel - 附加目前的日期和時間
boolean. 預設值:false

將目前的日期和時間附加至部署標籤。


AllowUpgrade - 允許升級
boolean. 預設值:true

允許升級至 Microsoft Azure 部署。


SimultaneousUpgrade - 同時升級
boolean. 選擇性。 使用 時機 AllowUpgrade == true 。 預設值:false

一次升級所有實例。 您的雲端服務目前無法使用。


ForceUpgrade - 強制升級
boolean. 選擇性。 使用 時機 AllowUpgrade == true 。 預設值:false

設定強制升級。 強制升級可能會導致本機資料遺失。


VerifyRoleInstanceStatus - 確認角色實例狀態
boolean. 預設值:false

讓工作等待角色實例處於就緒狀態。


DiagnosticStorageAccountKeys - 診斷儲存體帳戶金鑰
string.

將儲存體金鑰字串格式化為 Role:Storagekey 。 每個角色的診斷儲存體帳戶名稱是從診斷設定檔 (.wadcfgx) 擷取。

  • 如果找不到角色的 .wadcfgx 檔案:未針對該角色設定診斷副檔名。
  • 如果在 .wadcfgx 檔案中找不到儲存體帳戶名稱:預設儲存體帳戶用於儲存診斷結果,並忽略部署工作的儲存體金鑰參數。

注意:如果您的環境診斷結果中有敏感性資訊,請將 儲存 storage_account_key 為秘密變數。 例如:

  • WebRole: WebRole_storage_account_key
  • WorkerRole: WorkerRole_stoarge_account_key

NewServiceCustomCertificates - 要匯入的自訂憑證
string.

將自訂憑證字串格式化為 CertificatePfxBase64:CertificatePassword 。 將 certificate_password 儲存為秘密變數。 例如:

  • Certificate1: Certificate1_password
  • Certificate2: Certificate2_password

NewServiceAdditionalArguments - 其他引數
string.

在建立新服務時傳遞其他引數。 引數會傳遞至 New-AzureService Cmdlet。 例如: -Label 'MyTestService'


NewServiceAffinityGroup - 同質群組
string.

建立新服務時所使用的同質群組,而不是服務位置。


工作控制選項

除了工作輸入之外,所有工作都有控制選項。 如需詳細資訊,請參閱 控制項選項和一般工作屬性

輸出變數

無。

備註

使用此工作來部署 Azure 雲端服務。

規格需求

需求 描述
管線類型 YAML、傳統組建、傳統版本
在 上執行 代理程式
要求 自我裝載代理程式必須具備符合下列需求的功能,才能執行使用此工作的作業:azureps
Capabilities 此工作不符合作業中後續工作的任何需求。
命令限制 任何
可設定變數 任何
代理程式版本 1.103.0 或更新版本
工作類別 部署