共用方式為


ServiceFabricComposeDeploy@0 - Service Fabric Compose 部署 v0 工作

使用此工作將 Docker Compose 應用程式部署至 Service Fabric 叢集。 此工作會根據 Compose 檔案中定義的設定,將 Azure Service Fabric 應用程式部署到叢集。

此工作已被取代。

備註

此工作不支援使用工作流程身分識別同盟 Azure Resource Manager 驗證。

使用此工作將 Docker Compose 應用程式部署至 Service Fabric 叢集。 此工作會根據 Compose 檔案中定義的設定,將 Azure Service Fabric 應用程式部署到叢集。

備註

此工作不支援使用工作流程身分識別同盟 Azure Resource Manager 驗證。

語法

# Service Fabric Compose deploy v0
# Deploy a Docker Compose application to an Azure Service Fabric cluster.
- task: ServiceFabricComposeDeploy@0
  inputs:
    clusterConnection: # string. Alias: serviceConnectionName. Required. Cluster Service Connection. 
    composeFilePath: '**/docker-compose.yml' # string. Required. Compose File Path. Default: **/docker-compose.yml.
    applicationName: 'fabric:/Application1' # string. Required. Application Name. Default: fabric:/Application1.
  # Registry Settings
    registryCredentials: 'AzureResourceManagerEndpoint' # 'AzureResourceManagerEndpoint' | 'ContainerRegistryEndpoint' | 'UsernamePassword' | 'None'. Required. Registry Credentials Source. Default: AzureResourceManagerEndpoint.
    #dockerRegistryConnection: # string. Alias: dockerRegistryEndpointName. Optional. Use when registryCredentials = ContainerRegistryEndpoint. Docker Registry Service Connection. 
    azureSubscription: # string. Alias: azureSubscriptionEndpoint. Required when registryCredentials = AzureResourceManagerEndpoint. Azure subscription. 
    #registryUserName: # string. Optional. Use when registryCredentials = UsernamePassword. Registry User Name. 
    #registryPassword: # string. Optional. Use when registryCredentials = UsernamePassword. Registry Password. 
    #passwordEncrypted: true # boolean. Optional. Use when registryCredentials = UsernamePassword. Password Encrypted. Default: true.
  # Advanced Settings
    #upgrade: false # boolean. Upgrade. Default: false.
    #deployTimeoutSec: # string. Deploy Timeout (s). 
    #removeTimeoutSec: # string. Remove Timeout (s). 
    #getStatusTimeoutSec: # string. Get Status Timeout (s).

輸入

clusterConnection - 叢集服務連線
輸入別名:serviceConnectionNamestring。 必須的。

指定要用來連線到叢集的 Azure Service Fabric 服務連線。 選擇 [Manage],以註冊新的服務連線。


composeFilePath - 撰寫檔案路徑
string。 必須的。 預設值:**/docker-compose.yml

指定要部署之撰寫檔案的路徑。 變數 和通配符可以在路徑中使用。 範例: $(System.DefaultWorkingDirectory)/**/drop/projectartifacts/**/docker-compose.yml.

備註

在這項工作中不支持合併撰寫檔案。


applicationName - 應用程式名稱
string。 必須的。 預設值:fabric:/Application1

指定已部署應用程式的 Service Fabric 應用程式名稱。 使用 fabric:/ 作為前置詞。 Service Fabric 叢集中的應用程式名稱必須是唯一的。


registryCredentials - 登錄認證來源
string。 必須的。 允許的值:AzureResourceManagerEndpoint(Azure Resource Manager 服務連線)、ContainerRegistryEndpoint(Container Registry 服務連線)、UsernamePassword(使用者名稱和密碼),None。 預設值:AzureResourceManagerEndpoint

指定如何將 Docker 容器登錄的認證提供給部署工作。 允許的值為:

  • AzureResourceManagerEndpoint (Azure Resource Manager 服務連線):會使用 azureSubscription 取得 Azure Container Registry 的服務主體標識符和密鑰。
  • ContainerRegistryEndpoint (Container Registry 服務連線):使用 dockerRegistryConnection 來選取 Docker 登錄服務連線。 如果在組建代理程式上安裝與叢集服務連線中的伺服器證書指紋相符的憑證,則會用來加密密碼;否則,密碼將不會加密。
  • UsernamePassword (使用者名稱和密碼):使用 registryUsernameregistryPassword 來儲存 Docker 登錄的使用者名稱和密碼。 密碼應該使用 invoke-ServiceFabricEncryptText 搭配 Password Encrypted 選項來加密。 如果未使用 Invoke-ServiceFabricEncryptText加密密碼,且與叢集連線中的伺服器證書指紋相符的憑證會安裝在組建代理程式上,則會使用憑證來加密密碼。 否則,密碼將不會加密,而且會以純文本傳送。
  • None:未提供登錄認證。 這用於存取公用容器登錄。

dockerRegistryConnection - Docker Registry Service 連線
輸入別名:dockerRegistryEndpointNamestring。 選擇性。 registryCredentials = ContainerRegistryEndpoint時使用 。

指定 Docker 登錄服務連線。 如果在組建代理程式上安裝與叢集服務連線中的伺服器證書指紋相符的憑證,則會用來加密密碼;否則,密碼將不會加密。


azureSubscription - Azure 訂用帳戶
輸入別名:azureSubscriptionEndpointstringregistryCredentials = AzureResourceManagerEndpoint時為必要項。

指定 Azure 訂用帳戶。


registryUserName - 登錄用戶名稱
string。 選擇性。 registryCredentials = UsernamePassword時使用 。

指定 Docker 登錄的用戶名稱。


registryPassword - 登錄密碼
string。 選擇性。 registryCredentials = UsernamePassword時使用 。

指定 Docker 登錄的密碼。 如果未加密密碼,建議您使用自定義發行管線秘密變數來儲存密碼。


passwordEncrypted - 密碼加密
boolean。 選擇性。 registryCredentials = UsernamePassword時使用 。 預設值:true

使用 Invoke-ServiceFabricEncryptText 加密密碼。 如果您未加密密碼,且在組建代理程式上安裝與叢集服務連線中的伺服器證書指紋相符的憑證,則會用來加密密碼;否則,會發生錯誤。


upgrade - 升級
boolean。 預設值:false

升級現有的部署,而不是移除它。


deployTimeoutSec - 部署逾時 (s)
string

指定部署應用程式的逾時,以秒為單位。


removeTimeoutSec - 移除逾時 (秒)
string

指定移除現有應用程式的逾時,以秒為單位。


getStatusTimeoutSec - 取得狀態逾時 (s)
string

指定逾時,以秒為單位取得現有應用程式的狀態。


工作控制選項

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

輸出變數

沒有。

備註

使用此工作將 Docker-compose 應用程式部署至 Service Fabric 叢集。 此工作會根據撰寫檔案中定義的設定,將 Azure Service Fabric 應用程式部署到叢集。

備註

這項工作目前處於預覽狀態,且需要支援撰寫部署的 Service Fabric 預覽版本。 請參閱 Azure Service Fabric 中的Docker Compose 部署支援。

Service Fabric

  • 此工作會使用 Service Fabric 安裝來連線並部署至 Service Fabric 叢集。
  • 在組建代理程式上下載並安裝 Azure Service Fabric Core SDK

需求

要求 說明
管線類型 YAML、傳統組建、傳統版本
執行於 Agent、DeploymentGroup
需求 自我裝載代理程式必須具有 功能, 符合下列 需求, 執行使用此工作的作業: Cmd
功能 此工作不符合作業中後續工作的任何需求。
命令限制 任意
Settable 變數 任意
代理程式版本 1.95.0 或更新
工作類別 部署