Update Release Bundle Version

JFrog REST APIs

ft:sourceType
Paligo

Description: Updates an existing unsigned release bundle version.

Since: 1.2

Security: Authenticated users only. The user must have matching Release Bundle writer pemissions. .

Usage: PUT api/v1/release_bundle/:name/:version

Request headers: X-GPG-PASSPHRASE - String - the passphrase for the signing key, if applicable

Consumes: application/json

cURL Example

$ curl -u user:password -H "Accept: application/json" -H "Content-Type: application/json" -H "X-GPG-PASSPHRASE: keysPassphrase" -X PUT "http://ARTIFACTORY_SERVER_HOSTNAME:8082/distribution/api/v1/release_bundle/:name/:version" -T createbundle.json

updatebundle.json

{
  "dry_run": true|false,
  "sign_immediately": true|false,
  "description": "",
  "storing_repository": "repository-name"|null,
  "release_notes": {
    "syntax": "markdown|asciidoc|plain_text",
    "content": ""
  }, 
  "spec": {
    "queries": [
      {
        "aql": "items.find({ \"repo\" : \"example-repo-local\" })",
        "query_name": "query-1"
        "mappings": [
          {
            "input": "regex",
            "output": "$1/$2"
          }
        ],
        "added_props": [
          {
            "key": "",
            "values": [""]
          }
        ],
        "exclude_props_patterns": [ 
          "example_exclude_prop_pattern_1",
          "example_example_prop_pattern_2"
        ]
      }
    ]
  }
}

Field

Type

Required

Default Value

Since

Description

dry_run

Boolean

no

false

1.2

If true, only parses and validates.

Note: this parameter default was previously set to true in versions below 2.x.

sign_immediately

Boolean

no

false

1.2

if true, automatically signs the release bundle version.

storing_repository

String

no

null

1.3

A repository name at source Artifactory to store release bundle artifacts in. If not provided, Artifactory will use the default one (requires Artifactory 6.5 or later).

description

String

no

null

1.2

Description of the release bundle

release_notes

String

no

null

1.2

Describes the release notes for the release bundle version

release_notes.syntax

String

no

"plain_text"

1.2

The syntax for the release notes

release_notes.content

String

yes

N/A

1.2

The content of the release notes

spec

Object

yes

N/A

1.2

Describes the specification by artifacts are gathered and distributed in this release bundle

spec.queries

List (Object)

yes

N/A

1.2

List of query objects to gather artifacts by.

spec.queries.aql

String

yes

N/A

1.2

AQL query to gather the artifacts from Artifactory

spec.queries.query_name

String

no

"query-{index}"

1.2

A name to be used when displaying the query object

Note that the release bundle query name length must be between 2 and 32 characters long and must start with alphabetic character followed by an alphanumeric or '_-.:' characters only.

spec.queries.added_props

List (Object)

no

null

1.2

List of added properties which will be added to the artifacts after distribution of the release bundle

spec.queries.added_props.key

String

yes

N/A

1.2

Property key to be created or updated on distributed artifacts

spec.queries.added_props.values

List (String)

no

[ ]

1.2

List of values to be added to the property key after distribution of the release bundle

spec.queries.mappings

List (Object)

no

null

1.2

List of mappings, which are applied to the artifact paths after distribution of the release bundle

spec.queries.mappings.input

String

yes

N/A

1.2

Regex matcher for artifact paths

spec.queries.mappings.output

String

yes

N/A

1.2

Replacement for artifact paths matched by the "input" matcher. Capture groups can be used as "$1".

spec.exclude_props_patterns

List (String)

no

null

2.5.0

List of patterns for Properties keys to exclude after distribution of the release bundle. This will not an effect on the "added_props" properties.

Response status codes:

200 - Successfully updated release bundle version

400 - Release bundle version is signed

X - Status code for error passed from Artifactory AQL

Response headers: N/A Produces: application/json

Response

 {
        "name": "bundle-name",
        "version": "1.0",
        "state": "OPEN",
        "created": "2018-03-14T10:19:30.678Z",
        "artifacts": [
                {          
                        "checksum": "0651d26f4cc6ed60cd9d273c440daf7617459d3f6e3d512188ff19d4933e4ff6",
                        "source_repo_path": "conanx/demo/sample-conan1/1.0/testing/export/conanfile.py",
                        "target_repo_path": "conanx/demo/sample-conan1/1.0/testing/export/conanfile.py",
                        "props": [
                                {
                                        "key": "conan.package.version",
                                        "values": [
                                                "1.0"
                                        ]
                                },
                                ...
                        ]
                },
                {
                        "xray_scan_info": {
                        "blocked": boolean.
                        "blocked_reason": string (null if not blocked)
                },
                ...
        ],
        "archived": false
}

NPM, Bower and NuGet Package Types

When working with package types such as NPM, Bower and NuGet, that require transitive dependencies, you will need to create two separate release bundles: 1. An artifacts release bundle, and 2. A dependencies release bundle.

You can generate the build.info using JFrog CLI , and create the release bundles using the following dependency and artifact AQL queries:

Artifact AQL

builds.find({"name":"buileName", "number":"buildNumber"}).include("module.artifact.item")

Dependency AQL

builds.find({"name":"buildName", "number":"buildNumber"}).include("module.dependency.item")