Release Application Version CLI

Description: Releases the specified application version by moving it to the release stage (PROD).

Command:

jfrog app version-release <app-key> <version> [--sync <true|false>] [--promotion-type <copy|move>] [--dry-run <true|false>]

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 created.

<version>

required

string

The version number to assign to the application version in SemVer format.

--sync <true|false>

optional

boolean

Determines whether to perform the promotion synchronously or asynchronously.

The default value is true (synchronous), , which means that Artifactory waits for application version promotion to complete before allowing you to move on to the next task.

--promotion-type

optional

string

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.

--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: 'key1=value1;key2=value2;...'

--dry-run

optional

boolean

When set to true, simulates the promotion without actually performing it. The default value is false.

--exclude-repos

optional

array:string

A list of semicolon-separated (;) repositories to exclude from the promotion. The default is false.

--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.

Example 1: Release an application version

This command releases an application version.

jfrog app version-release APP001 1.0.0

Output (success):

{
    "message": "Version release initiated successfully.",
    "details": {
        "app-key": "<app-key>",
        "version": "<version>",
        "target-stage": "<target-stage>",
        "synchronous": "<sync>",
        "excluded-repositories": ["<repo1>", "<repo2>"],
        "included-repositories": ["<repo3>", "<repo4>"],
        "comment": "<promotion-comment>",
        "promotion-type": "<copy>",
        "dry-run": "<dry-run>",
        "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 app version-release APP001 1.0.0 DEV --sync true --exclude-repos "repoA;repoB" --promotion-type copy

Example 3: Perform a dry-run release:

This command simulates a release of an application verion:

jfrog app version-release APP001 1.0.0 --dry-run true