Promote Release Bundle v2 Version

JFrog REST APIs

Content Type
REST API

Description: Promotes the selected Release Bundle v2 version.

Since: 7.63.2

Security: Requires Read and Promote permissions for the Release Bundles; requires Deploy/Cache permissions to target artifact repository paths.

Usage:POST  /lifecycle/api/v2/promotion/records/{name}/{version}

Query Parameters (optional):

Field

Type

Description

async

boolean

Determines whether the operation should be asynchronous (true) or synchronous (false): The default value is true.

When running in asynchronous mode, the timeline shows the promotion as being "in progress" until the operation completes successfully, fails, or times out. In the meantime, you are free to continue working in Artifactory.Use the Release Bundle Version Timeline

When running in synchronous mode, you must wait until the promotion operation completes successfully, fails, or times out.

Note

When using Xray to scan Release Bundles before they are promoted, it may take several minutes for Xray to complete the scan and determine whether to block the promotion or allow it to proceed. This can cause a significant delay when promoting in synchronous mode, as you cannot perform other operations in Artifactory until the promotion (including the scan) is done.

For more information about scanning promotions, see Scan Release Bundle v2 Versions with Xray.Scan Release Bundle v2 Versions with Xray

operation

string

Determines how to perform the promotion:

  • copy: Copies of the contents of the Release Bundle version to the target repository. The contents remain in the source repository. This is the default.

  • move: Moves the contents of the Release Bundle version from the repository of the last promotion to the target repository.

Note

This query parameter is not relevant when performing the first promotion of a Release Bundle v2 version. During the first promotion, the contents are always copied from the repository in which the Release Bundle version was created to the target repository.

In addition, if a Release Bundle version is promoted to the same environment in which it already resides, the copy option is used automatically to prevent the possible loss of artifacts.

Warning

If you later roll back a move promotion (?operation=move), the Release Bundle version is restored to its previous environment as it existed at the time of its creation. Properties or evidence added after creation are lost.

repository_key

string

Optional Release Bundles repository identifier that identifies where a Release Bundle version resides. If this parameter and the project query parameter are not specified, the default value of release-bundles-v2 is assumed.

project

string

Optional project key used to determine the Release Bundles repository. By convention, each project may contain only one Release Bundles system repository with the name <project-key>-release-bundles-v2. This query parameter may be used instead of repository_key.

Important

You must specify either the repository_key or the project when performing an operation (for example, promotion or distribution) on a Release Bundle v2 that belongs to a specific project.Projects

Note

If any artifact in the promotion has a different checksum than the same artifact in the target environment, the promotion stops, and an error message is displayed.

Important

If the Release Bundle v2 version belongs to a specific project, you must specify either the repository_key or the project. The repository_key refers to the system repository that contains the Release Bundles related to the project (<project_key>-release_bundles-v2).Projects

Request Header: X-JFrog-Signing-Key-Name (key-pair name to use for signature creation)

Important

If you do not specify a key, Artifactory will use the same key that was used when creating this Release Bundle version.

Consumes: application/json

Sample Request:

{
    "environment": "QA",
    "included_repository_keys": [],
    "excluded_repository_keys": [],
    "artifact_additional_properties": [
        {
            "key": "env",
            "values": [
                "QA"
            ]
        },
        {
            "key": "testers",
            "values": [
                "LouiseR", "PhilipG", "PavelN"
            ]
        }
    ]
}

The request includes the following information:

Property

Description

environment

Name of the target environment for the promotion.

included_repository_keys

Defines specific repositories to include in the promotion.

If this property is left undefined, all repositories (except those specifically excluded) are included in the promotion.

Important

If one or more repositories are specifically included, all other repositories are excluded (regardless of what is defined in excluded_repository_keys).

excluded_repository_keys

Defines specific repositories to exclude from the promotion.

artifact_additional_properties

Key-value pairs that define properties to add to each promoted artifact on top of any existing properties.

Note

If a property with the same key already exists on the artifact, the value defined in artifact_additional_properties will override the previous value.

Sample Response:

{
    "repository_key": "release-bundles-v2",
    "release_bundle_name": "Commons-Bundle",
    "release_bundle_version": "1.0.0",
    "environment": "QA",
    "included_repository_keys": [
        "commons-qa-generic-local",
        "commons-qa-docker-local",
        "commons-qa-maven-local"
    ],
    "excluded_repository_keys": [],
    "artifact_additional_properties":, [
        {
            "key": "env",
            "values": [
                "QA"
            ]
        },
        {
            "key": "testers",
            "values": [
                "LouiseR", "PhilipG", "PavelN"
            ]
        }
    ]
    "created": "2023-05-19T06:21:44.916Z",
    "created_millis": 1684477304916,
    "source_environment": "DEV"
}

Additional information included in the response:

Property

Description

created

Timestamp when the new version was created (ISO 8601 standard).

created_millis

Timestamp when the new version was created (in milliseconds).

source_environment

The source environment from which the Release Bundle version was promoted.

Status Codes:

Code

Description

Details

200

Submitted (asynchronous)

The request to promote the Release Bundle version was submitted successfully.

201

Promoted (synchronous)

The Release Bundle version was promoted successfully.

400

Bad Request

The request was malformed.

404

Not Found

The Release Bundle name or version does not exist.

409

Conflict

Can occur in the following cases:

  • When you try to promote a Release Bundle version when another promotion of the same version to the same environment is still in progress.

  • When the Release Bundle version you are trying to promote contains an artifact that already exists at the target location with a different checksum.