Distribute Release Bundle Version v2

JFrog REST APIs

ft:sourceType
Paligo

Description: Distributes a Release Bundle v2 version.

Since: 7.63.2 (Artifactory), 2.19.1 (Distribution)

Security: Requires permissions to distribute Release Bundles; requires destination permissions to the target Release Bundle path.

Usage:POST /lifecycle/api/v2/distribution/distribute/{release_bundle_name}/{release_bundle_version}

Query Parameters (optional): repository_key. See Common Optional Query Parameters.

Sample Request:

{
    "dry_run": false,
    "auto_create_missing_repositories": "false",
    "distribution_rules": [
        {
            "site_name": "*"
        }
    ],
    "modifications": {
        "mappings": [
            {
                "input": "(.*)/(.*)",
                "output": "$1/mapping/$2"
            }
        ]
    }
}

The request includes the following information:

Property

Description

dry_run

Determines whether this should be a dry run to test if the release bundle can distribute to the Edge nodes matching the distribution rule.

The default value is false.

auto_create_missing_repositories

Determines whether to create missing repositories automatically on the distribution targets. The default value is false, which means that if a missing repository is encountered in a particular target, the distribution to that target will fail.

Note

In Distribution versions prior to 2.19.0, the option to create missing repositories automatically could not work together with path mappings (defined under modifications as described below), unless a special configuration parameter (distribute.auto-create-target-repo-advance) was changed from its default setting to true.

Starting with 2.19.0, the default setting of this parameter has changed to true, which removes this limitation.

If you want to prevent missing repositories from being created automatically when path mappings are defined, change the setting of distribute.auto-create-target-repo-advance back to false.

distribution_rules

Defines which distribution targets to include when distributing the Release Bundle.

modifications

(Optional) Specifies the path mapping for the artifacts on the distribution targets in the form of input and output regex mapping pairs. These mapping pairs define where the queried artifact is located and where it should be placed. Use this option if the path on the target is different than the source path.

Sample Response:

{
    "id": 721286369066762240,
    "sites": [
        {
            "name": "infra-dist-yevdoa-08244892-edge-2",
            "service_id": "jfrt@01h2wh4psm4mhf04w2n00p0rp4",
            "type": "artifactory"
        },
        {
            "name": "HOME",
            "service_id": "jfrt@01h2wgyv4wn0c40jbv881c0www",
            "type": "artifactory"
        },
        {
            "name": "infra-dist-yevdoa-08244892-edge-1",
            "service_id": "jfrt@01h2wh54qwn5rk1wp2rfzh032n",
            "type": "artifactory"
        },
        {
            "name": "infra-dist-yevdoa-08244892-edge-0",
            "service_id": "jfrt@01h2wh9ebwyw5v01nanend06zf",
            "type": "artifactory"
        }
    ]
}

The response includes the following information:

Property

Description

id

The ID number of the distribution operation.

sites

The name, service_id and type of each destination target.

name

The name of Edge node serving as the destination target for the distributed Release Bundle.

service_id

The unique identifier of the Artifactory instance where the Release Bundle was distributed.

type

The destination target device type (e.g. Artifactory).

Status Codes:

Code

Description

200

Success

400

Bad Request

404

Not Found

409

Already Exists