This blog post will provide you with information on how to use JFrog CLI with JFrog Distribution workflows. JFrog Distribution manages your software releases in a centralized platform. It enables you to securely distribute release bundles to multiple remote locations and update them as new release versions are produced. Learn more about JFrog Distribution >
From version 1.35.1, JFrog CLI supports Distribution 2.x commands. Full list of commands >
Note: Requires JFrog Distribution version 2.0 or higher.
Start by downloading and installing JFrog CLI.
The JFrog Platform uses the Artifactory (rt) domain for operating Release Bundles and distribution flow. Hence, all CLI commands should start with an rt prefix:
Creating a Release Bundle
An unsigned Release Bundle Version allows updating its content before making it final for distribution.
The minimal set of arguments to create release bundle include:
- Release Bundle Name (30 chars max)
- Release Bundle Version (30 chars max)
Release Bundle Files Spec: Path to a file spec, which describes what artifacts to include in Release Bundle Version. Learn more about JFrog CLI File Spec >
Example of a Spec File – all files in myAppRepo:
When creating the Release Bundle Version, it is also possible to finalize it by signing it using a pre-configured GPG key:
Note: Once the Release Bundle Version is signed, it is not possible to make any changes.
Updating a Release Bundle
To update an unsigned Release Bundle Version, it is possible to use the release-bundle-update command. The parameters are the same as for release-bundle-create, but it will work only on existing versions of the Release Bundle.
Signing a Release Bundle
Signing a Release Bundle finalizes the process of creating a Release Bundle. This sets the Release Bundle status to Signed and the Release Bundle can no longer be edited. If the GPG key was created with a passphrase, please provide it as part of the command:
Note: The passphrase is optional. Provide GPG key passphrase if you generated the GPG signing keys with a passphrase.
Distributing a release bundle
Once you have created your Release Bundle, you can distribute it to the Artifactory Edge Nodes that you are privileged to distribute to using release-bundle-distribute command. The distribution will happen according to the distribution rules that are provided in rules file (json format):
Example of distribution rules – distribute to all Edge nodes:
Deleting a release bundle
Using the release-bundle-delete command, it is possible to delete a Release Bundle Version from an Edge Nodes and optionally from JFrog Distribution itself.
To delete Release Bundle Version from Edge Nodes:
To avoid the confirmation message by adding –quiet to the command:
In order to delete the Release Bundle Version from the JFrog Distribution itself, add –delete-from-dist parameter:
You can also delete the Release Bundle Version from JFrog Distribution only, leaving distributed copies on the Edge nodes (however this is not a recommended scenario):
In order to get more info and verbose messages in command-line, please set the log level to debug as follows:
Get started with JFrog CLI and try it out for yourself!