ServiceFabricUpdateAppVersions@1 - Update Service Fabric App Versions v1 task

Use this task in a build pipeline to automatically update the versions of a packaged Service Fabric app. This task appends a version suffix to all service and app versions, specified in the manifest files, in an Azure Service Fabric app package.

Syntax

# Update Service Fabric App Versions v1
# Automatically updates the versions of a packaged Service Fabric application.
- task: ServiceFabricUpdateAppVersions@1
  inputs:
    applicationPackagePath: # string. Required. Application Package. 
    versionSuffix: '.$(Build.BuildNumber)' # string. Required. Version Value. Default: .$(Build.BuildNumber).
    #versionBehavior: 'Append' # 'Append' | 'Replace'. Version Behavior. Default: Append.
    #updateOnlyChanged: false # boolean. Update only if changed. Default: false.
    #pkgArtifactName: # string. Optional. Use when updateOnlyChanged = true. Package Artifact Name. 
    #logAllChanges: true # boolean. Optional. Use when updateOnlyChanged = true. Log all changes. Default: true.
    #compareType: 'LastSuccessful' # 'LastSuccessful' | 'Specific'. Optional. Use when updateOnlyChanged = true. Compare against. Default: LastSuccessful.
    #buildNumber: # string. Optional. Use when compareType = Specific. Build Number.

Inputs

applicationPackagePath - Application Package
string. Required.

Specifies the location of the Service Fabric application package to be deployed to the cluster. Example: $(system.defaultworkingdirectory)/**/drop/applicationpackage. Variables and wildcards can be used in the path.


versionSuffix - Version Value
string. Required. Default value: .$(Build.BuildNumber).

The value used to specify the version in the manifest files.

Tip

You can modify the build number format directly or use a logging command to dynamically set a variable in any format. For example, you can use $(VersionSuffix) defined in a PowerShell task:

$versionSuffix = ".$([DateTimeOffset]::UtcNow.ToString('yyyyMMdd.HHmmss'))"

Write-Host "##vso[task.setvariable variable=VersionSuffix;]$versionSuffix"


versionBehavior - Version Behavior
string. Allowed values: Append, Replace. Default value: Append.

Appends the version value to existing values in the manifest files or replaces them.


updateOnlyChanged - Update only if changed
boolean. Default value: false.

Incrementally updates only the packages that have changed. Use the deterministic compiler flag to ensure builds with the same inputs produce the same outputs.


pkgArtifactName - Package Artifact Name
string. Optional. Use when updateOnlyChanged = true.

Specifies the name of the artifact containing the application package from the previous build.


logAllChanges - Log all changes
boolean. Optional. Use when updateOnlyChanged = true. Default value: true.

Compares all files in every package and logs if the file was added, removed, or if its content changed. Otherwise, compares files in a package only until the first change is found for faster performance.


compareType - Compare against
string. Optional. Use when updateOnlyChanged = true. Allowed values: LastSuccessful (Last Successful Build), Specific (Specific Build). Default value: LastSuccessful.

Compares against the last completed and successful build or against a specific build.


buildNumber - Build Number
string. Optional. Use when compareType = Specific.

Specifies the build number for comparison if the task is comparing against a specific build.


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.

Requirements

Requirement Description
Pipeline types YAML, Classic build
Runs on Agent
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 Utility