Release Application Version CLI
Release an application version to the PROD stage using the JFrog CLI.
Description: Releases the specified application version by moving it to the release stage (PROD).
Command:
jfrog apptrust version-release <app-key> <version> [--sync <true|false>] [--promotion-type <copy|move|keep>]
Alias command: jf at vr
Command Options
| Option | Required/Optional | Type | Description |
|---|---|---|---|
<app-key> | required | string | The application key of the application for which the version is being released. |
<version> | required | string | The version to release. |
--sync <true|false> | optional | boolean | Determines whether to perform the promotion synchronously or asynchronously. Default is |
--promotion-type | optional | string | The type of promotion to perform: Specifies the promotion type:
|
--props "<key>=<value1>[,<value2>,...]" | optional | object | Defines a semicolon-separated list of properties to be added to each artifact in the application version. The format is: |
--exclude-repos | optional | array:string | A list of semicolon-separated (;) repositories to exclude from the promotion. |
--include-repos | optional | array:string | A list of semicolon-separated (;) repositories to include in the promotion. If this property is not defined, all repositories (except those explicitly excluded) are included in the promotion. If one or more repositories are specifically included, all other repositories are excluded. |
--overwrite-strategy | optional | string | Determines whether artifacts can be overwritten during release. This is a strategy for handling target artifacts with the same path but different checksums and is an exception to the general immutability of artifacts. If omitted, the platform determines the applicable strategy. Policy options:
keep as the promotion-type, the overwrite-strategy parameter will be ignored. |
--path-mapping | optional | array:string | Changes the relative path structure or path names of artifacts in the target environment. A list of semicolon-separated (;) mapping rules in the form 'input=<regex>, output=<target-path>[, package-type=<type>]'. Fields are:
$1. |
Example 1: Release an application version
This command releases an application version.
jfrog apptrust version-release APP001 1.0.0
Output (success):
{
"message": "Version release initiated successfully.",
"details": {
"app-key": "<app-key>",
"version": "<version>",
"synchronous": "<sync>",
"excluded-repositories": ["<repo1>", "<repo2>"],
"included-repositories": ["<repo3>", "<repo4>"],
"promotion-type": "<copy>",
"status": "<status>"
}
}
Output (error):
{
"message": "Failed to release version.",
"error": "<error-message>"
}
Example 2: Release an application version with optional flags
This command performs a copy release in synchronous mode, while excluding repoA and repoB from the release.
jfrog apptrust version-release APP001 1.0.0 --sync=true --exclude-repos "repoA;repoB" --promotion-type copy
Frequently Asked Questions
Common questions about releasing an application version.
FAQs
Q: How do I release an application version to production using the JFrog CLI?
A: Run jf apptrust version-release <app-key> <version> (alias jf at vr). By default this moves the version to the PROD stage synchronously. See Example 1.
Q: What is the difference between the copy, move, and keep promotion types for a release?
A: copy preserves the source artifacts and copies them to PROD, move transfers the source artifacts to PROD, and keep releases the version without copying or moving any artifacts.
Q: Can I exclude specific repositories from a release?
A: Yes. Pass --exclude-repos with a semicolon-separated list of repository names to leave out of the release. See Example 2.
Q: What happens if I choose keep as the promotion type and also set an overwrite-strategy?
A: The overwrite-strategy parameter is ignored when promotion-type is keep, because no artifacts are copied or moved during the release.
Q: Can I change artifact paths when releasing to PROD?
A: Yes. Use --path-mapping with regex input and output rules to restructure paths or names in the target environment.
Related Topics
Updated 2 days ago
