ServiceFabricDeploy@1 - Service Fabric application deployment v1 task
Use this task to deploy a Service Fabric application to a cluster. This task deploys an Azure Service Fabric application to a cluster according to the settings defined in the publish profile.
Note
This task does not support Azure Resource Manager authentication with workflow identity federation.
Syntax
# Service Fabric application deployment v1
# Deploy an Azure Service Fabric application to a cluster.
- task: ServiceFabricDeploy@1
inputs:
applicationPackagePath: # string. Required. Application Package.
serviceConnectionName: # string. Required. Cluster Service Connection.
#publishProfilePath: # string. Publish Profile.
#applicationParameterPath: # string. Application Parameters.
#overrideApplicationParameter: false # boolean. Override Application Parameters. Default: false.
# Advanced Settings
#compressPackage: false # boolean. Compress Package. Default: false.
#copyPackageTimeoutSec: # string. CopyPackageTimeoutSec.
#registerPackageTimeoutSec: # string. RegisterPackageTimeoutSec.
overwriteBehavior: 'SameAppTypeAndVersion' # 'Always' | 'Never' | 'SameAppTypeAndVersion'. Required. Overwrite Behavior. Default: SameAppTypeAndVersion.
#skipUpgradeSameTypeAndVersion: false # boolean. Skip upgrade for same Type and Version. Default: false.
#skipPackageValidation: false # boolean. Skip package validation. Default: false.
# Upgrade Settings
#useDiffPackage: false # boolean. Use Diff Package. Default: false.
#overridePublishProfileSettings: false # boolean. Override All Publish Profile Upgrade Settings. Default: false.
#isUpgrade: true # boolean. Optional. Use when overridePublishProfileSettings = true. Upgrade the Application. Default: true.
#unregisterUnusedVersions: true # boolean. Unregister Unused Versions. Default: true.
#upgradeMode: 'Monitored' # 'Monitored' | 'UnmonitoredAuto' | 'UnmonitoredManual'. Required when overridePublishProfileSettings = true && isUpgrade = true. Upgrade Mode. Default: Monitored.
#FailureAction: 'Rollback' # 'Rollback' | 'Manual'. Required when overridePublishProfileSettings = true && isUpgrade = true && upgradeMode = Monitored. FailureAction. Default: Rollback.
#UpgradeReplicaSetCheckTimeoutSec: # string. Optional. Use when overridePublishProfileSettings = true && isUpgrade = true. UpgradeReplicaSetCheckTimeoutSec.
#TimeoutSec: # string. Optional. Use when overridePublishProfileSettings = true && isUpgrade = true. TimeoutSec.
#ForceRestart: false # boolean. Optional. Use when overridePublishProfileSettings = true && isUpgrade = true. ForceRestart. Default: false.
#HealthCheckRetryTimeoutSec: # string. Optional. Use when overridePublishProfileSettings = true && isUpgrade = true && upgradeMode = Monitored. HealthCheckRetryTimeoutSec.
#HealthCheckWaitDurationSec: # string. Optional. Use when overridePublishProfileSettings = true && isUpgrade = true && upgradeMode = Monitored. HealthCheckWaitDurationSec.
#HealthCheckStableDurationSec: # string. Optional. Use when overridePublishProfileSettings = true && isUpgrade = true && upgradeMode = Monitored. HealthCheckStableDurationSec.
#UpgradeDomainTimeoutSec: # string. Optional. Use when overridePublishProfileSettings = true && isUpgrade = true && upgradeMode = Monitored. UpgradeDomainTimeoutSec.
#ConsiderWarningAsError: false # boolean. Optional. Use when overridePublishProfileSettings = true && isUpgrade = true && upgradeMode = Monitored. ConsiderWarningAsError. Default: false.
#DefaultServiceTypeHealthPolicy: # string. Optional. Use when overridePublishProfileSettings = true && isUpgrade = true && upgradeMode = Monitored. DefaultServiceTypeHealthPolicy.
#MaxPercentUnhealthyDeployedApplications: # string. Optional. Use when overridePublishProfileSettings = true && isUpgrade = true && upgradeMode = Monitored. MaxPercentUnhealthyDeployedApplications.
#UpgradeTimeoutSec: # string. Optional. Use when overridePublishProfileSettings = true && isUpgrade = true && upgradeMode = Monitored. UpgradeTimeoutSec.
#ServiceTypeHealthPolicyMap: # string. Optional. Use when overridePublishProfileSettings = true && isUpgrade = true && upgradeMode = Monitored. ServiceTypeHealthPolicyMap.
# Docker Settings
#configureDockerSettings: false # boolean. Configure Docker settings. Default: false.
#registryCredentials: 'AzureResourceManagerEndpoint' # 'AzureResourceManagerEndpoint' | 'ContainerRegistryEndpoint' | 'UsernamePassword'. Required when configureDockerSettings = true. Registry Credentials Source. Default: AzureResourceManagerEndpoint.
#dockerRegistryConnection: # string. Alias: dockerRegistryEndpoint. Required when configureDockerSettings = true && registryCredentials = ContainerRegistryEndpoint. Docker Registry Service Connection.
#azureSubscription: # string. Alias: azureSubscriptionEndpoint. Required when configureDockerSettings = true && registryCredentials = AzureResourceManagerEndpoint. Azure subscription.
#registryUserName: # string. Optional. Use when configureDockerSettings = true && registryCredentials = UsernamePassword. Registry User Name.
#registryPassword: # string. Optional. Use when configureDockerSettings = true && registryCredentials = UsernamePassword. Registry Password.
#passwordEncrypted: true # boolean. Optional. Use when configureDockerSettings = true && registryCredentials = UsernamePassword. Password Encrypted. Default: true.
# Service Fabric Application Deployment v1
# Deploy a Service Fabric application to a cluster.
- task: ServiceFabricDeploy@1
inputs:
applicationPackagePath: # string. Required. Application Package.
serviceConnectionName: # string. Required. Cluster Service Connection.
#publishProfilePath: # string. Publish Profile.
#applicationParameterPath: # string. Application Parameters.
#overrideApplicationParameter: false # boolean. Override Application Parameters. Default: false.
# Advanced Settings
#compressPackage: false # boolean. Compress Package. Default: false.
#copyPackageTimeoutSec: # string. CopyPackageTimeoutSec.
#registerPackageTimeoutSec: # string. RegisterPackageTimeoutSec.
overwriteBehavior: 'SameAppTypeAndVersion' # 'Always' | 'Never' | 'SameAppTypeAndVersion'. Required. Overwrite Behavior. Default: SameAppTypeAndVersion.
#skipUpgradeSameTypeAndVersion: false # boolean. Skip upgrade for same Type and Version. Default: false.
#skipPackageValidation: false # boolean. Skip package validation. Default: false.
# Upgrade Settings
#useDiffPackage: false # boolean. Use Diff Package. Default: false.
#overridePublishProfileSettings: false # boolean. Override All Publish Profile Upgrade Settings. Default: false.
#isUpgrade: true # boolean. Optional. Use when overridePublishProfileSettings = true. Upgrade the Application. Default: true.
#unregisterUnusedVersions: true # boolean. Unregister Unused Versions. Default: true.
#upgradeMode: 'Monitored' # 'Monitored' | 'UnmonitoredAuto' | 'UnmonitoredManual'. Required when overridePublishProfileSettings = true && isUpgrade = true. Upgrade Mode. Default: Monitored.
#FailureAction: 'Rollback' # 'Rollback' | 'Manual'. Required when overridePublishProfileSettings = true && isUpgrade = true && upgradeMode = Monitored. FailureAction. Default: Rollback.
#UpgradeReplicaSetCheckTimeoutSec: # string. Optional. Use when overridePublishProfileSettings = true && isUpgrade = true. UpgradeReplicaSetCheckTimeoutSec.
#TimeoutSec: # string. Optional. Use when overridePublishProfileSettings = true && isUpgrade = true. TimeoutSec.
#ForceRestart: false # boolean. Optional. Use when overridePublishProfileSettings = true && isUpgrade = true. ForceRestart. Default: false.
#HealthCheckRetryTimeoutSec: # string. Optional. Use when overridePublishProfileSettings = true && isUpgrade = true && upgradeMode = Monitored. HealthCheckRetryTimeoutSec.
#HealthCheckWaitDurationSec: # string. Optional. Use when overridePublishProfileSettings = true && isUpgrade = true && upgradeMode = Monitored. HealthCheckWaitDurationSec.
#HealthCheckStableDurationSec: # string. Optional. Use when overridePublishProfileSettings = true && isUpgrade = true && upgradeMode = Monitored. HealthCheckStableDurationSec.
#UpgradeDomainTimeoutSec: # string. Optional. Use when overridePublishProfileSettings = true && isUpgrade = true && upgradeMode = Monitored. UpgradeDomainTimeoutSec.
#ConsiderWarningAsError: false # boolean. Optional. Use when overridePublishProfileSettings = true && isUpgrade = true && upgradeMode = Monitored. ConsiderWarningAsError. Default: false.
#DefaultServiceTypeHealthPolicy: # string. Optional. Use when overridePublishProfileSettings = true && isUpgrade = true && upgradeMode = Monitored. DefaultServiceTypeHealthPolicy.
#MaxPercentUnhealthyDeployedApplications: # string. Optional. Use when overridePublishProfileSettings = true && isUpgrade = true && upgradeMode = Monitored. MaxPercentUnhealthyDeployedApplications.
#UpgradeTimeoutSec: # string. Optional. Use when overridePublishProfileSettings = true && isUpgrade = true && upgradeMode = Monitored. UpgradeTimeoutSec.
#ServiceTypeHealthPolicyMap: # string. Optional. Use when overridePublishProfileSettings = true && isUpgrade = true && upgradeMode = Monitored. ServiceTypeHealthPolicyMap.
# Docker Settings
#configureDockerSettings: false # boolean. Configure Docker settings. Default: false.
#registryCredentials: 'AzureResourceManagerEndpoint' # 'AzureResourceManagerEndpoint' | 'ContainerRegistryEndpoint' | 'UsernamePassword'. Required when configureDockerSettings = true. Registry Credentials Source. Default: AzureResourceManagerEndpoint.
#dockerRegistryConnection: # string. Alias: dockerRegistryEndpoint. Required when configureDockerSettings = true && registryCredentials = ContainerRegistryEndpoint. Docker Registry Service Connection.
#azureSubscription: # string. Alias: azureSubscriptionEndpoint. Required when configureDockerSettings = true && registryCredentials = AzureResourceManagerEndpoint. Azure subscription.
#registryUserName: # string. Optional. Use when configureDockerSettings = true && registryCredentials = UsernamePassword. Registry User Name.
#registryPassword: # string. Optional. Use when configureDockerSettings = true && registryCredentials = UsernamePassword. Registry Password.
#passwordEncrypted: true # boolean. Optional. Use when configureDockerSettings = true && registryCredentials = UsernamePassword. Password Encrypted. Default: true.
Inputs
applicationPackagePath
- Application Package
string
. Required.
Specifies the path to the application package that is to be deployed. Variables and wildcards can be used in the path.
serviceConnectionName
- Cluster Service Connection
string
. Required.
Specifies the Azure Service Fabric service connection to be used to connect to the cluster. The settings defined in this referenced service connection override those defined in the publish profile. Choose Manage
to register a new service connection.
To connect to the cluster, the service fabric task uses the machine cert store to store the information about the certificate. If two releases run together on one machine using the same certificate, they will start properly. However, if one of the tasks is complete, then the certificate from the machine cert store will be cleaned up, which affects the second release.
publishProfilePath
- Publish Profile
string
.
Optional. Specifies the path to the publish profile file that defines the settings to use. Variables and wildcards can be used in the path. Learn more about how to create publish profiles in Visual Studio.
applicationParameterPath
- Application Parameters
string
.
Optional. Specifies the path to the application parameters file. Variables and wildcards can be used in the path. If specified, this overrides the value in the publish profile. Learn more about how to create an application parameters file in Visual Studio.
overrideApplicationParameter
- Override Application Parameters
boolean
. Default value: false
.
Optional. Specifies the variables defined in the build or release pipeline are matched against the Parameter Name
entries in the application manifest file. Learn more about how to create an application parameters file in Visual Studio.
Example:
<Parameters>
<Parameter Name="SampleApp_PartitionCount" Value="1" />
<Parameter Name="SampleApp_InstanceCount" DefaultValue="-1" />
</Parameters>
If your application has a parameter defined as in the above example, and you want to change the partition count to 2
, you can define a release pipeline or an environment variable SampleApp_PartitionCount
and its value as 2
.
Note
If the same variables are defined in the release pipeline and in the environment, then the environment variables will supersede the release pipeline variables.
compressPackage
- Compress Package
boolean
. Default value: false
.
Optional. Specifies whether the application package should be compressed before copying to the image store. If enabled, this overrides the value in the publish profile. Learn more about compressing packages.
copyPackageTimeoutSec
- CopyPackageTimeoutSec
string
.
Optional. Specifies the timeout in seconds for copying application package to the image store. If specified, this overrides the value in the publish profile.
registerPackageTimeoutSec
- RegisterPackageTimeoutSec
string
.
Optional. Specifies the timeout in seconds for registering or un-registering an application package.
overwriteBehavior
- Overwrite Behavior
string
. Required. Allowed values: Always
, Never
, SameAppTypeAndVersion
. Default value: SameAppTypeAndVersion
.
Overwrites behavior if an application exists in the cluster with the same name and upgrades have not been configured.
Never
will not remove the existing application. This is the default behavior.
Always
will remove the existing application, even if its application type and version is different from the application being created.
SameAppTypeAndVersion
will remove the existing application only if its application type and version is the same as the application being created.
skipUpgradeSameTypeAndVersion
- Skip upgrade for same Type and Version
boolean
. Default value: false
.
Optional. Specifies whether an upgrade will be skipped if the same application type and version already exists in the cluster; otherwise, the upgrade fails during validation. If enabled, re-deployments are idempotent.
skipPackageValidation
- Skip package validation
boolean
. Default value: false
.
Optional. Specifies whether the package should be validated or not before deployment. Learn more about package validation.
useDiffPackage
- Use Diff Package
boolean
. Default value: false
.
Optional. Upgrades by using a diff package that contains only the updated application files, the updated application manifest, and the service manifest files.
A diff package is created by comparing the package specified in the application package input against the package that is currently registered in the target cluster. If a service version in the cluster's current package is the same as the new package, then this service package will be removed from the new application package. Learn more about diff packages.
overridePublishProfileSettings
- Override All Publish Profile Upgrade Settings
boolean
. Default value: false
.
Optional. Overrides all upgrade settings with either specified values or the default value (if not specified). Learn more about upgrade settings.
isUpgrade
- Upgrade the Application
boolean
. Optional. Use when overridePublishProfileSettings = true
. Default value: true
.
Overwrites the application if the value is set to false
.
unregisterUnusedVersions
- Unregister Unused Versions
boolean
. Default value: true
.
Optional. Indicates whether all unused versions of the application type will be removed after an upgrade.
upgradeMode
- Upgrade Mode
string
. Required when overridePublishProfileSettings = true && isUpgrade = true
. Allowed values: Monitored
, UnmonitoredAuto
, UnmonitoredManual
. Default value: Monitored
.
FailureAction
- FailureAction
string
. Required when overridePublishProfileSettings = true && isUpgrade = true && upgradeMode = Monitored
. Allowed values: Rollback
, Manual
. Default value: Rollback
.
UpgradeReplicaSetCheckTimeoutSec
- UpgradeReplicaSetCheckTimeoutSec
string
. Optional. Use when overridePublishProfileSettings = true && isUpgrade = true
.
TimeoutSec
- TimeoutSec
string
. Optional. Use when overridePublishProfileSettings = true && isUpgrade = true
.
ForceRestart
- ForceRestart
boolean
. Optional. Use when overridePublishProfileSettings = true && isUpgrade = true
. Default value: false
.
HealthCheckRetryTimeoutSec
- HealthCheckRetryTimeoutSec
string
. Optional. Use when overridePublishProfileSettings = true && isUpgrade = true && upgradeMode = Monitored
.
HealthCheckWaitDurationSec
- HealthCheckWaitDurationSec
string
. Optional. Use when overridePublishProfileSettings = true && isUpgrade = true && upgradeMode = Monitored
.
HealthCheckStableDurationSec
- HealthCheckStableDurationSec
string
. Optional. Use when overridePublishProfileSettings = true && isUpgrade = true && upgradeMode = Monitored
.
UpgradeDomainTimeoutSec
- UpgradeDomainTimeoutSec
string
. Optional. Use when overridePublishProfileSettings = true && isUpgrade = true && upgradeMode = Monitored
.
ConsiderWarningAsError
- ConsiderWarningAsError
boolean
. Optional. Use when overridePublishProfileSettings = true && isUpgrade = true && upgradeMode = Monitored
. Default value: false
.
DefaultServiceTypeHealthPolicy
- DefaultServiceTypeHealthPolicy
string
. Optional. Use when overridePublishProfileSettings = true && isUpgrade = true && upgradeMode = Monitored
.
MaxPercentUnhealthyDeployedApplications
- MaxPercentUnhealthyDeployedApplications
string
. Optional. Use when overridePublishProfileSettings = true && isUpgrade = true && upgradeMode = Monitored
.
UpgradeTimeoutSec
- UpgradeTimeoutSec
string
. Optional. Use when overridePublishProfileSettings = true && isUpgrade = true && upgradeMode = Monitored
.
ServiceTypeHealthPolicyMap
- ServiceTypeHealthPolicyMap
string
. Optional. Use when overridePublishProfileSettings = true && isUpgrade = true && upgradeMode = Monitored
.
configureDockerSettings
- Configure Docker settings
boolean
. Default value: false
.
Configures the application with the specified Docker settings.
registryCredentials
- Registry Credentials Source
string
. Required when configureDockerSettings = true
. Allowed values: AzureResourceManagerEndpoint
(Azure Resource Manager Service Connection), ContainerRegistryEndpoint
(Container Registry Service Connection), UsernamePassword
(Username and Password). Default value: AzureResourceManagerEndpoint
.
Specifies how credentials for the Docker registry are provided.
dockerRegistryConnection
- Docker Registry Service Connection
Input alias: dockerRegistryEndpoint
. string
. Required when configureDockerSettings = true && registryCredentials = ContainerRegistryEndpoint
.
Specifies a Docker registry service connection. Required for commands that need to authenticate with a registry.
Note
The task tries to encrypt the registry secret before transmitting it to the service fabric cluster. However, the task needs the cluster's server certificate to be installed on the agent machine. If the certificate is not present, the registry secret will not be encrypted.
azureSubscription
- Azure subscription
Input alias: azureSubscriptionEndpoint
. string
. Required when configureDockerSettings = true && registryCredentials = AzureResourceManagerEndpoint
.
Specifies an Azure subscription.
Note
The task will try to encrypt the registry secret before transmitting it to the service fabric cluster. However, the task needs the cluster's server certificate to be installed on the agent machine. If the certificate is not present, the registry secret will not be encrypted.
registryUserName
- Registry User Name
string
. Optional. Use when configureDockerSettings = true && registryCredentials = UsernamePassword
.
Specifies the username for the Docker registry.
registryPassword
- Registry Password
string
. Optional. Use when configureDockerSettings = true && registryCredentials = UsernamePassword
.
Specifies the password for the Docker registry. If the password is not encrypted, you should use a custom release pipeline secret variable to store it.
passwordEncrypted
- Password Encrypted
boolean
. Optional. Use when configureDockerSettings = true && registryCredentials = UsernamePassword
. Default value: true
.
You should encrypt your password using Invoke-ServiceFabricEncryptText. If you do not, and a certificate matching the Server Certificate Thumbprint in the Cluster Service Connection is installed on the build agent, that certificate will be used to encrypt the password; otherwise, an error will occur.
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 Service Fabric application to a cluster. This task deploys an Azure Service Fabric application to a cluster according to the settings defined in the publish profile.
Service Fabric
This task uses a Service Fabric installation to connect and deploy to a Service Fabric cluster. Download and install Service Fabric 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 |
Athugasemdir
https://aka.ms/ContentUserFeedback.
Væntanlegt: Á árinu 2024 munum við hætta með GitHub-mál sem ábendingaleið fyrir efni og skipta því út fyrir nýtt ábendingakerfi. Frekari upplýsingar er að finna hér:Senda inn og skoða endurgjöf fyrir