संपादित करें

इसके माध्यम से साझा किया गया


ServiceFabricComposeDeploy@0 - Service Fabric Compose deploy v0 task

Use this task to deploy a Docker Compose application to a Service Fabric cluster. This task deploys an Azure Service Fabric application to a cluster according to the settings defined in the Compose file.

This task is deprecated.

Use this task to deploy a Docker Compose application to a Service Fabric cluster. This task deploys an Azure Service Fabric application to a cluster according to the settings defined in the Compose file.

Syntax

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

Inputs

clusterConnection - Cluster Service Connection
Input alias: serviceConnectionName. string. Required.

Specifies an Azure Service Fabric service connection to be used to connect to the cluster. Choose Manage to register a new service connection.


composeFilePath - Compose File Path
string. Required. Default value: **/docker-compose.yml.

Specifies the path to the compose file that is to be deployed. Variables and wildcards can be used in the path. Example: $(System.DefaultWorkingDirectory)/**/drop/projectartifacts/**/docker-compose.yml.

Note

Combining compose files is not supported as part of this task.


applicationName - Application Name
string. Required. Default value: fabric:/Application1.

Specifies the Service Fabric application name of the deployed application. Use fabric:/ as a prefix. Application names within a Service Fabric cluster must be unique.


registryCredentials - Registry Credentials Source
string. Required. Allowed values: AzureResourceManagerEndpoint (Azure Resource Manager service connection), ContainerRegistryEndpoint (Container Registry service connection), UsernamePassword (Username and Password), None. Default value: AzureResourceManagerEndpoint.

Specifies how credentials for the Docker container registry will be provided to the deployment task. The allowed values are:

  • AzureResourceManagerEndpoint (Azure Resource Manager service connection): uses azureSubscription to obtain a service principal ID and key for an Azure Container Registry.
  • ContainerRegistryEndpoint (Container Registry service connection): uses dockerRegistryConnection to select a Docker registry service connection. If a certificate matching the Server Certificate Thumbprint in the Cluster Service Connection is installed on the build agent, it will be used to encrypt the password; otherwise, the password will not be encrypted.
  • UsernamePassword (Username and Password): uses registryUsername and registryPassword to store the username and password for the Docker registry. Passwords should be encrypted using Invoke-ServiceFabricEncryptText with the Password Encrypted option. If passwords are not encrypted with Invoke-ServiceFabricEncryptText, and a certificate matching the Server Certificate Thumbprint in the Cluster Connection is installed on the build agent, the certificate will be used to encrypt the password. Otherwise, the password will not be encrypted and will be sent in clear text.
  • None: No registry credentials are provided. This is used for accessing public container registries.

dockerRegistryConnection - Docker Registry Service Connection
Input alias: dockerRegistryEndpointName. string. Optional. Use when registryCredentials = ContainerRegistryEndpoint.

Specifies a Docker registry service connection. If a certificate matching the Server Certificate Thumbprint in the Cluster Service Connection is installed on the build agent, it will be used to encrypt the password; otherwise, the password will not be encrypted.


azureSubscription - Azure subscription
Input alias: azureSubscriptionEndpoint. string. Required when registryCredentials = AzureResourceManagerEndpoint.

Specifies an Azure subscription.


registryUserName - Registry User Name
string. Optional. Use when registryCredentials = UsernamePassword.

Specifies the username for the Docker registry.


registryPassword - Registry Password
string. Optional. Use when registryCredentials = UsernamePassword.

Specifies the password for the Docker registry. If the password is not encrypted, it is recommended that you use a custom release pipeline secret variable to store it.


passwordEncrypted - Password Encrypted
boolean. Optional. Use when registryCredentials = UsernamePassword. Default value: true.

Encrypts your password using Invoke-ServiceFabricEncryptText. If you do not encrypt your password, and a certificate matching the Server Certificate Thumbprint in the Cluster Service Connection is installed on the build agent, it will be used to encrypt the password; otherwise, an error will occur.


upgrade - Upgrade
boolean. Default value: false.

Upgrades an existing deployment rather than removing it.


deployTimeoutSec - Deploy Timeout (s)
string.

Specifies the timeout, in seconds,for deploying the application.


removeTimeoutSec - Remove Timeout (s)
string.

Specifies the timeout, in seconds,for removing an existing application.


getStatusTimeoutSec - Get Status Timeout (s)
string.

Specifies the timeout, in seconds,for getting the status of an existing application.


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 a Docker-compose application to a Service Fabric cluster. This task deploys an Azure Service Fabric application to a cluster according to the settings defined in the compose file.

Note

This task is currently in preview and requires a preview version of Service Fabric that supports compose deploy. See Docker Compose deployment support in Azure Service Fabric.

Service Fabric

  • This task uses a Service Fabric installation to connect and deploy to a Service Fabric cluster.
  • Download and install Azure Service Fabric Core SDK on the build agent.

Requirements

Requirement Description
Pipeline types YAML, Classic build, Classic release
Runs on Agent, DeploymentGroup
Demands Self-hosted agents must have capabilities that match the following demands to run jobs that use this task: Cmd
Capabilities This task does not satisfy any demands for subsequent tasks in the job.
Command restrictions Any
Settable variables Any
Agent version 1.95.0 or greater
Task category Deploy