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

OptionRequired/OptionalTypeDescription
<app-key>requiredstringThe application key of the application for which the version is being released.
<version>requiredstringThe version to release.
--sync <true|false>optionalboolean

Determines whether to perform the promotion synchronously or asynchronously.

Default is true (synchronous). Pass --sync=false to return as soon as the request is accepted, without waiting for the operation to complete.

--promotion-typeoptionalstring

The type of promotion to perform:

Specifies the promotion type:
  • copy: Copies the application version to the target stage, preserving the source artifacts. This is the default.
Note No physical copy occurs if the source and target repositories are identical.
  • move: Moves the application version to the target stage, transferring the source.

  • keep: Releases without copying or moving artifacts.

--props "<key>=<value1>[,<value2>,...]"optionalobject

Defines a semicolon-separated list of properties to be added to each artifact in the application version.

The format is: 'key1=value1;key2=value2;...'

--exclude-reposoptionalarray:stringA list of semicolon-separated (;) repositories to exclude from the promotion.
--include-reposoptionalarray: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-strategyoptionalstringDetermines 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:
  • latest: Overwrite is permitted only if the artifact tag is latest. This option is intended primarily for artifacts that make use of the latest tag.
  • all: Overwriting of artifacts of any path is permitted.
  • disabled: No overwriting is permitted. This is the strongest option for preserving immutability during release.
If you chose keep as the promotion-type, the overwrite-strategy parameter will be ignored.
--path-mappingoptionalarray:stringChanges 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:
  • input: A standard regex pattern executed against the source relative paths to capture components via grouping.
  • output: The target path string using placeholder variables, for example, $1, $2, to reconstruct the destination layout.
  • package-type: A regular expression string used to target specific artifact types, for example, docker, npm, or .* to match all types.
Quote the value to prevent shell expansion of $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.

plusFAQs
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


Did this page help you?