ServiceFabricUpdateManifests@2 - Update Service Fabric manifests v2 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.
updateType
- Update Type
string
. Required. Allowed values: Manifest versions
, Docker image settings
. Default value: Manifest versions
.
Specifies the type of update that should be made to the manifest files. In order to use both update types, add an instance of this task to the build pipeline for each type of update to be executed.
applicationPackagePath
- Application Package
string
. Required.
Specifies the path to the application package. Variables and wildcards can be used in the path. applicationPackagePath
must not have a trailing slash, either \
or /
.
versionSuffix
- Version Value
string
. Required when updateType = Manifest versions
. Default value: .$(Build.BuildNumber)
.
Specifies 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 a 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
. Optional. Use when updateType = Manifest versions
. Allowed values: Append
, Replace
. Default value: Append
.
Specifies whether to append the version value to existing values in the manifest files or replace them.
updateOnlyChanged
- Update only if changed
boolean
. Optional. Use when updateType = Manifest versions
. Default value: false
.
Appends the new version suffix to only the packages that have changed from a previous build. If no changes are found, the version suffix from the previous build will be appended.
Note
By default, the compiler will create different outputs even if no changes were made. Use the deterministic compiler flag to ensure builds with the same inputs produce the same outputs.
pkgArtifactName
- Package Artifact Name
string
. Optional. Use when updateType = Manifest versions && updateOnlyChanged = true
.
Specifies the name of the artifact containing the application package for comparison.
logAllChanges
- Log all changes
boolean
. Optional. Use when updateType = Manifest versions && updateOnlyChanged = true
. Default value: true
.
Compares all files in every package and log if the file was added, removed, or if its content changed. Otherwise, this boolean compares files in a package only until the first change is found for faster performance.
compareType
- Compare against
string
. Optional. Use when updateType = Manifest versions && updateOnlyChanged = true
. Allowed values: LastSuccessful
(Last Successful Build), Specific
(Specific Build). Default value: LastSuccessful
.
Specifies whether to compare against the last completed and successful build or against a specific build.
buildNumber
- Build Number
string
. Optional. Use when updateType = Manifest versions && compareType = Specific
.
Specifies the build number for comparison.
overwriteExistingPkgArtifact
- Overwrite Existing Package Artifact
boolean
. Optional. Use when updateType = Manifest versions && updateOnlyChanged = true
. Default value: true
.
Downloads a new copy of the artifact. Otherwise, this boolean uses an existing copy if present.
imageDigestsPath
- Image Digests Path
string
. Required when updateType = Docker image settings
.
Specifies the path to a text file that contains the digest values of the Docker images associated with the Service Fabric application. This file can be output by the Docker task when using the push action. The file should contain lines of text in the format of registry/image_name@digest_value
.
All tasks have control options in addition to their task inputs. For more information, see Control options and common task properties.
None.
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.
Note
This task requires Windows PowerShell.
This task is not available in release pipelines.
This task can only be used in a build pipeline to automatically update the versions of a packaged Service Fabric app.
This task support two types of updates:
Manifest version: Updates Service and Application versions specified in manifest files in a Service fabric application package. If specified,
manifest version
compares current files against a previous build and updates the version only for those changed services.Docker image settings: Updates docker container image settings specified in manifest files in a Service fabric application package. The image settings to be placed are picked from two files:
a. Image names file: This file is generated by the build task.
b. Image digests file: This file is generated by the docker task when it pushes images to registry.
Requirement | Description |
---|---|
Pipeline types | YAML, Classic build |
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 | Utility |