ServiceFabricComposeDeploy@0 - Service Fabric Compose 部署 v0 任务

使用此任务将 Docker Compose 应用程序部署到 Service Fabric 群集。 此任务根据 Compose 文件中定义的设置将 Azure Service Fabric 应用程序部署到群集。

语法

# 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).
# Service Fabric Compose Deploy v0
# Deploy a docker-compose application to a 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 资源管理器 服务连接) , ContainerRegistryEndpoint (容器注册表服务连接) , UsernamePassword (用户名和密码) , 。 None 默认值:AzureResourceManagerEndpoint

指定如何将 Docker 容器注册表的凭据提供给部署任务。 允许的值为:

  • AzureResourceManagerEndpoint (Azure 资源管理器服务连接) :使用 azureSubscription 获取Azure 容器注册表的服务主体 ID 和密钥。
  • ContainerRegistryEndpoint (容器注册表服务连接) :使用 dockerRegistryConnection 选择 Docker 注册表服务连接。 如果在生成代理上安装与群集服务连接中的服务器证书指纹匹配的证书,则它将用于加密密码;否则,不会加密密码。
  • UsernamePassword (用户名和密码) :使用 registryUsernameregistryPassword 存储 Docker 注册表的用户名和密码。 应使用 Invoke-ServiceFabricEncryptTextPassword Encrypted 选项加密密码。 如果未使用 Invoke-ServiceFabricEncryptText加密密码,并且生成代理上安装了与群集连接中的服务器证书指纹匹配的证书,则证书将用于加密密码。 否则,不会加密密码,并且将以明文形式发送。
  • None:未提供注册表凭据。 这用于访问公共容器注册表。

dockerRegistryConnection - Docker 注册表服务连接
输入别名: dockerRegistryEndpointNamestring. 可选。 在 时 registryCredentials = ContainerRegistryEndpoint使用 。

指定 Docker 注册表服务连接。 如果在生成代理上安装与群集服务连接中的服务器证书指纹匹配的证书,则它将用于加密密码;否则,不会加密密码。


azureSubscription - Azure 订阅
输入别名: azureSubscriptionEndpointstring. 当 registryCredentials = AzureResourceManagerEndpoint 时,需要此选项。

指定 Azure 订阅。


registryUserName - 注册表用户名
string. 可选。 在 时 registryCredentials = UsernamePassword使用 。

指定 Docker 注册表的用户名。


registryPassword - 注册表密码
string. 可选。 在 时 registryCredentials = UsernamePassword使用 。

指定 Docker 注册表的密码。 如果未加密密码,建议使用自定义发布管道机密变量来存储密码。


passwordEncrypted - 密码加密
boolean. 可选。 在 时 registryCredentials = UsernamePassword使用 。 默认值:true

使用 Invoke-ServiceFabricEncryptText 加密密码。 如果未加密密码,并且已在生成代理上安装与群集服务连接中的服务器证书指纹匹配的证书,则它将用于加密密码;否则,将发生错误。


upgrade - 升级
boolean. 默认值:false

升级现有部署,而不是将其删除。


deployTimeoutSec - 部署超时 ()
string.

指定用于部署应用程序的超时(以秒为单位)。


removeTimeoutSec - 删除超时 ()
string.

指定删除现有应用程序的超时(以秒为单位)。


getStatusTimeoutSec - 获取状态超时 ()
string.

指定获取现有应用程序状态的超时(以秒为单位)。


任务控制选项

除了任务输入,所有任务都有控制选项。 有关详细信息,请参阅 控制选项和常见任务属性

输出变量

无。

备注

使用此任务将 Docker-compose 应用程序部署到 Service Fabric 群集。 此任务根据 compose 文件中定义的设置将 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
功能 此任务不满足作业中后续任务的任何要求。
命令限制 任意
可设置变量 任意
代理版本 1.95.0 或更高版本
任务类别 部署