diff --git a/documentation/CLI-for-JFrog-Lifecycle.md b/documentation/CLI-for-JFrog-Lifecycle.md index 6679c1bd2..57e9abc55 100644 --- a/documentation/CLI-for-JFrog-Lifecycle.md +++ b/documentation/CLI-for-JFrog-Lifecycle.md @@ -10,11 +10,15 @@ Read more about JFrog CLI [here](https://jfrog.com/help/r/jfrog-cli). **Note** > JFrog Release Lifecycle Management is only available since [Artifactory 7.63.2](https://jfrog.com/help/r/jfrog-release-information/artifactory-7.63.2-cloud). --- -​ -## Creating a Release Bundle from builds or from existing Release Bundles -​ -Use this command to create a Release Bundle from one of two sources: -1. Published build infos. To use, provide the `--builds` option, which accepts a path to a JSON file with the following syntax: + +### Commands + +The following sections describe the commands available in JFrog CLI for use with the Release Lifecycle Management functionality. + +### Creating a release bundle from builds or from existing release bundles + +This command allows creating a release bundle from a published build-info or an existing release bundle. +1. To create a release bundle from published build-infos, provide the `--builds` option, which accepts a path to a file, with the following JSON format: ```json { "builds": [ @@ -26,11 +30,11 @@ Use this command to create a Release Bundle from one of two sources: ] } ``` - `number` is optional (if left empty, the latest build will be used) + `number` is optional, latest build will be used if empty. - `project` is optional (if left empty, the default project will be used) -​ -2. Existing Release Bundles. To use, provide the `--release-bundles` option, which accepts a path to a JSON file with the following syntax: + `project` is optional, default project will be used if empty. + +2. To create a release bundle from existing release bundles, provide the `--release-bundles` option, which accepts a path to a file, with the following JSON format: ```json { "releaseBundles": [ @@ -42,59 +46,56 @@ Use this command to create a Release Bundle from one of two sources: ] } ``` - `project` is optional (if left empty, the default project will be used) - -| | | -|------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------| -| Command-name | release-bundle-create | -| Abbreviation | rbc | -| Command options | | -| --builds | \[Optional\]

Path to a JSON file containing information of the source builds from which to create a Release Bundle. | -| --project | \[Optional\]

Project key associated with the Release Bundle version. | -| --release-bundles | \[Optional\]

Path to a JSON file containing information about the source Release Bundles from which to create a Release Bundle. | -| --server-id | \[Optional\]

Platform server ID configured using the config command. | -| --signing-key | \[Mandatory\]

The GPG/RSA key-pair name given in Artifactory. | -| --sync | \[Default: false\]

Set to true to run synchronously. | -| Command arguments | | -| release bundle name | Name of the newly created Release Bundle. | -| release bundle version | Version of the newly created Release Bundle. | - -### Examples -​ -#### Example 1 -​ -Create a Release Bundle with the name "myApp" and version "1.0.0", with the signing key pair "myKeyPair". -The Release Bundle will include the artifacts included in the builds that were provided in the builds spec. + `project` is optional, default project will be used if empty. + +| | | +|------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | release-bundle-create | +| Abbreviation | rbc | +| Command options | | +| --builds | \[Optional\]

Path to a JSON file containing information about source builds from which to create a release bundle. | +| --project | \[Optional\]

JFrog Project key associated with the Release Bundle version. | +| --release-bundles | \[Optional\]

Path to a JSON file containing information about source release bundles from which to create a release bundle. | +| --server-id | \[Optional\]

Platform server ID configured using the `jf c add` command. | +| --signing-key | \[Mandatory\]

The GPG/RSA key-pair name given in Artifactory. | +| --sync | \[Default: false\]

Set to true to run synchronously. | +| Command arguments | | +| release bundle name | Name of the newly created Release Bundle. | +| release bundle version | Version of the newly created Release Bundle. | + +#### Examples + +##### Example 1 + +Create a release bundle with name "myApp" and version "1.0.0", with signing key pair "myKeyPair". +The release bundle will include artifacts of the builds that were provided in the builds spec. ``` jf rbc --builds=/path/to/builds-spec.json --signing-key=myKeyPair myApp 1.0.0 ``` +##### Example 2 -#### Example 2 -​ -Create a Release Bundle with the name "myApp" and version "1.0.0", with the signing key pair "myKeyPair". -The Release Bundle will include the artifacts included in the Release Bundles that were provided in the Release Bundles spec. +Create a release bundle with name "myApp" and version "1.0.0", with signing key pair "myKeyPair". +The release bundle will include artifacts of the release bundles that were provided in the release bundles spec. ``` jf rbc --spec=/path/to/release-bundles-spec.json --signing-key=myKeyPair myApp 1.0.0 ``` +##### Example 3 -#### Example 3 -​ -Create a Release Bundle synchronously with the name "myApp" and version "1.0.0", in the project "project0", with the signing key pair "myKeyPair". -The Release Bundle will include the artifacts included in the Release Bundles that were provided in the Release Bundles spec. +Create a release bundle synchronously with name "myApp" and version "1.0.0", in project "project0", with signing key pair "myKeyPair". +The release bundle will include artifacts of the release bundles that were provided in the release bundles spec. ``` jf rbc --spec=/path/to/release-bundles-spec.json --signing-key=myKeyPair --sync=true --project=project0 myApp 1.0.0 ``` +### Promoting a release bundle + +This commands allows promoting a release bundle to a target environment. -## Promoting a Release Bundle -​ -Use this command to promote a Release Bundle to a target environment. -​ | | | |------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Command-name | release-bundle-promote | | Abbreviation | rbp | | Command options | | -| --overwrite | \[Default: false\]

Set to true to replace artifacts with the same name but a different checksum if such already exist at the promotion targets. By default, the promotion is stopped in the case of a conflict. | +| --overwrite | \[Default: false\]

Set to true to replace artifacts with the same name but a different checksum if such already exist at the promotion targets. By default, the promotion is stopped in a case of such conflict | | --project | \[Optional\]

Project key associated with the Release Bundle version. | | --server-id | \[Optional\]

Platform server ID configured using the config command. | | --signing-key | \[Mandatory\]

The GPG/RSA key-pair name given in Artifactory. | @@ -104,21 +105,19 @@ Use this command to promote a Release Bundle to a target environment. | release bundle version | Version of the Release Bundle to promote. | | environment | Name of the target environment for the promotion. | -### Examples +#### Examples +##### Example 1 -#### Example 1 -​ -Promote a Release Bundle named "myApp" version "1.0.0" to environment "PROD". -Use the signing key pair "myKeyPair". +Promote a release bundle named "myApp" version "1.0.0" to environment "PROD". +Use signing key pair "myKeyPair". ``` jf rbp --signing-key=myKeyPair myApp 1.0.0 PROD ``` +##### Example 2 -#### Example 2 -​ Promote a release bundle synchronously to environment "PROD". The release bundle is named "myApp", version "1.0.0", of project "project0". Use signing key pair "myKeyPair" and overwrite at conflict. ``` jf rbp --signing-key=myKeyPair --project=project0 --overwrite=true --sync=true myApp 1.0.0 PROD -``` +``` \ No newline at end of file