From 7f350ea2159b245a72bdf0637de473236dfe6dda Mon Sep 17 00:00:00 2001 From: Rima Polsky Date: Mon, 12 May 2025 12:07:29 +0300 Subject: [PATCH 1/3] Introduce annotate command into release-lifecycle-management --- .../release-lifecycle-management.md | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/release-lifecycle-management.md b/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/release-lifecycle-management.md index 5730abd8..b81e2c38 100644 --- a/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/release-lifecycle-management.md +++ b/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/release-lifecycle-management.md @@ -203,6 +203,85 @@ Promote a Release Bundle, using promotion type flag. jf rbp --signing-key=myKeyPair --promotion-type="move" myApp 1.0.0 PROD ``` +# Annotate a Release Bundle v2 + +This command allows to add a single tag to a Release Bundle v2 version and/or define one or more properties or delete +one or more properties. + +### Commands Params + +| | | +|------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | release-bundle-annotate | +| Abbreviation | rba | +| **Command arguments:** | | +| release bundle name | Name of the Release Bundle to annotate. | +| release bundle version | Version of the Release Bundle to annotate. | | +| **Command options:** | | +| `--tag` |

[Optional]
The tag is a single free-text value limited to 128 characters, beginning and ending with an alphanumeric character ([a-z0-9A-Z]), with dashes (-), underscores (_), dots (.),and alphanumerics between. | +| .

| | +| `--properties` |

[Optional]
Key-value pairs separated by a semicolon (;). Keys are limited to 255 characters. Values are limited to 2400 characters.

| +| `--del-prop` |

[Optional]
Removes a key and all its associated values.

| +| `--recursive` |

[Default: true]
Set to false(0) to don't run recursively.

| + + +### Examples + +#### Example 1 + +Add or modify a tag or property. + +``` +jf rba mybundle 1.0.0 --tag=release --properties "environment=production;buildNumber=1234" +``` + +#### Example 2 + +Whenever you use the --tag command option, the value you define replaces the current value. + +``` +jf rba mybundle 1.0.0 --tag=rejected +``` +In the example above, the tag that was defined previously (release) is replaced with the new tag rejected. + +#### Example 3 + +Whenever you use the --properties command option with an existing key, the values that you define replace the current values. + +``` +jf rba mybundle 1.0.0 --properties "environment=DEV,PROD,QA" +``` +In the example above, the value for environment that was defined previously (production) is replaced by the values DEV, PROD, and QA. + +#### Remove Tags and Properties + +#### Example 1 + +To remove the tag, set it to empty. + +``` +jf rba mybundle 1.0.0 --tag="" +``` + +#### Example 2 + +To remove the values from an existing key without removing the key, leave the value empty. + +``` +jf rba mybundle 1.0.0 --properties "build=''" +``` +In the example above, all values defined for the build key are removed but the key is retained. + +#### Example 3 + +To remove a key and its associated values, use the --del-prop command option. + +``` +jf rba mybundle 1.0.0 --del-prop "environment" +``` +In the example above, the environment key and all its associated values are removed. + + ## Distribute a Release Bundle v2 This command distributes a Release Bundle to an Edge node. From 2925b37014955fe1d2ec14134821746425fffc57 Mon Sep 17 00:00:00 2001 From: Rima Polsky Date: Mon, 12 May 2025 14:13:28 +0300 Subject: [PATCH 2/3] Code review changes --- .../release-lifecycle-management.md | 26 ++++++++----------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/release-lifecycle-management.md b/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/release-lifecycle-management.md index b81e2c38..f5847d6a 100644 --- a/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/release-lifecycle-management.md +++ b/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/release-lifecycle-management.md @@ -205,24 +205,20 @@ jf rbp --signing-key=myKeyPair --promotion-type="move" myApp 1.0.0 PROD # Annotate a Release Bundle v2 -This command allows to add a single tag to a Release Bundle v2 version and/or define one or more properties or delete -one or more properties. +This command allows you to add a single tag to a Release Bundle v2 version, and/or set or delete one or more properties. ### Commands Params -| | | -|------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command-name | release-bundle-annotate | -| Abbreviation | rba | -| **Command arguments:** | | -| release bundle name | Name of the Release Bundle to annotate. | -| release bundle version | Version of the Release Bundle to annotate. | | -| **Command options:** | | -| `--tag` |

[Optional]
The tag is a single free-text value limited to 128 characters, beginning and ending with an alphanumeric character ([a-z0-9A-Z]), with dashes (-), underscores (_), dots (.),and alphanumerics between. | -| .

| | -| `--properties` |

[Optional]
Key-value pairs separated by a semicolon (;). Keys are limited to 255 characters. Values are limited to 2400 characters.

| -| `--del-prop` |

[Optional]
Removes a key and all its associated values.

| -| `--recursive` |

[Default: true]
Set to false(0) to don't run recursively.

| +| | | +|------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | release-bundle-annotate | +| Abbreviation | rba | +| **Command arguments:** | | +| release bundle name | Name of the Release Bundle to annotate. | +| `--tag` |

[Optional]
The tag is a single free-text value limited to 128 characters, beginning and ending with an alphanumeric character ([a-z0-9A-Z]), with dashes (-), underscores (_), dots (.),and alphanumerics between.

| +| `--properties` |

[Optional]
Key-value pairs separated by a semicolon (;). Keys are limited to 255 characters. Values are limited to 2400 characters.

| +| `--del-prop` |

[Optional]
Removes a key and all its associated values.

| +| `--recursive` |

[Default: true]
Set to false(0) to don't run recursively.

| ### Examples From 9555aa1717f280e03f0e7f53d473d42a8345eaf0 Mon Sep 17 00:00:00 2001 From: Rima Polsky Date: Wed, 2 Jul 2025 23:55:29 +0300 Subject: [PATCH 3/3] Introduce support multiple source for create release bundle --- .../release-lifecycle-management.md | 120 ++++++++++++++++-- 1 file changed, 106 insertions(+), 14 deletions(-) diff --git a/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/release-lifecycle-management.md b/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/release-lifecycle-management.md index f5847d6a..77a60aa2 100644 --- a/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/release-lifecycle-management.md +++ b/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/release-lifecycle-management.md @@ -93,24 +93,90 @@ The **create** command allows creating a Release Bundle v2 using [file specs](ht Only a single AQL query may be provided. + * Specified package (one or more): + ``` + { + "files": [ + { + "package": "catalina", + "version":"1.0.0", + "type": "maven", + "repoKey": "catalina-dev-maven-local" + }, + ] + } + ``` + + * A Release Bundle created from multiple sources: + The Release Bundle can include any number of builds, artifacts (using a pattern), packages, and Release Bundles. + However, it can include only one AQL query: + ``` + { + "files": [ + { + "build": "Commons-Build/1.0.0", + "includeDeps":"true", + "project": "default" + }, + { + "bundle": "rb1/1.0.0", + "project": "default" + }, + { + "bundle": "rb4/1.0.0", + "project": "default" + }, + { + "pattern": "catalina-dev-maven-local/*.jar" + }, + { + "package": "commons", + "version":"1.0.1", + "type": "maven", + "repoKey": "commons-dev-maven-local" + }, + { + "package": "catalina", + "version":"1.0.0", + "type": "maven", + "repoKey": "catalina-dev-maven-local" + }, + { + "aql": { + "items.find": { + "repo":{"$eq":"catalina-dev-maven-local"}, + "$and":[ + {"name": {"$match":"*1.0.0.pom"}} + ] + } + } + } + ] + } + ``` + + ### Command Params -| | | -| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| Command-name | release-bundle-create | -| Abbreviation | rbc | +| | | +| ------------------ |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | release-bundle-create | +| Abbreviation | rbc | | **Command arguments:** | | -| release bundle name | Name of the newly created Release Bundle. | +| release bundle name | Name of the newly created Release Bundle. | | release bundle version | Version of the newly created Release Bundle. | -| **Command options:** | | -| `--project` |

[Optional]
Project key associated with the created Release Bundle version.

| -| `--server-id` |

[Optional]
Platform Server ID configured using the 'jf config' command.

| -| `--signing-key` |

[Optional]
The GPG/RSA key-pair name defined in Artifactory. The signing-key can also be configured as an environment variable. If no key is specified, Artifactory uses a default key.

| -| `--spec` |

[Optional]
Path to a File Spec. If you do not define the spec, you must include the build-name and build-number as environment variables, flags, or a combination of both (flags override environment variables).

| -| `--spec-vars` |

[Optional]
List of semicolon-separated(;) variables in the form of "key1=value1;key2=value2;..." (wrapped by quotes) to be replaced in the File Spec. In the File Spec, the variables should be used as follows: ${key1}.

| -| `--build-name` |

[Optional]
The name of the build from which to create the Release Bundle.

| -| `--build-number` |

[Optional]
The number of the build from which to create the Release Bundle.

| -| `--sync` |

[Default: true]
Set to false to run asynchronously.

| +| **Command options:** | | +| `--project` |

[Optional]
Project key associated with the created Release Bundle version.

| +| `--server-id` |

[Optional]
Platform Server ID configured using the 'jf config' command.

| +| `--signing-key` |

[Optional]
The GPG/RSA key-pair name defined in Artifactory. The signing-key can also be configured as an environment variable. If no key is specified, Artifactory uses a default key.

| +| `--spec` |

[Optional]
Path to a File Spec. If you do not define the spec, you must include the build-name and build-number as environment variables, flags, or a combination of both (flags override environment variables).

| +| `--spec-vars` |

[Optional]
List of semicolon-separated(;) variables in the form of "key1=value1;key2=value2;..." (wrapped by quotes) to be replaced in the File Spec. In the File Spec, the variables should be used as follows: ${key1}.

| +| `--build-name` |

[Optional]
The name of the build from which to create the Release Bundle.

| +| `--build-number` |

[Optional]
The number of the build from which to create the Release Bundle.

| +| `--source-type-release-bundles`|

[Optional]
One or more Release Bundles to include in the new Release Bundle in the form of "name=[rb-name], version=[rb-version];..." .

| +| `--source-type-builds` |

[Optional]
One or more builds to include in the new Release Bundle in the form of "name=[build-name], id=[build-id], include-deps=[true/false];...".

| +| `--sync` |

[Default: true]
Set to false to run asynchronously.

| + ### Examples @@ -138,6 +204,32 @@ Create a Release Bundle using build name and build number variables. jf rbc --build-name=Common-builds --build-number=1.0.0 myApp 1.0.0 ``` +#### Example 4 + +Create a Release Bundle from multiple builds + +``` +jf rbc rb3 1.0.0 --source-type-builds "name=Commons-Build, id=1.0.0, include-deps=true; name=Commons-Build, id=1.0.1" +``` + +#### Example 5 + +Create a Release Bundle from multiple existing Release Bundles. + +``` +jf rbc rb3 1.0.0 --project catalina --source-type-release-bundles "name=rb1, version=1.0.0; name=rb2, version=1.0.0" +``` + +#### Example 6 + +Create a Release Bundle from existing builds and Release Bundles. + +``` +jf rbc rb3 1.0.0 --source-type-builds "name=Commons-Build, id=1.0.0, include-deps=true; name=Commons-Build, id=1.0.1" +--source-type-release-bundles "name=rb1, version=1.0.0; name=rb2, version=1.0.0" +``` + + ## Promote a Release Bundle v2 This command allows promoting a Release Bundle to a target environment.