Remember Artifactory CLI? That was the tool we released several months ago to simplify your automation scripts while optimizing upload and download of files to and from Artifactory. Well, after hundreds of downloads and a lot of great feedback we got, we decided “what’s good for Artifactory, is good for Bintray too.” So please meet…
JFrog CLI is an evolution of Artifactory CLI and effectively replaces it adding commands that simplify your work with Bintray, just like Artifactory CLI simplified your work with Artifactory. You might want to recap on our post about Artifactory CLI, but if you’re thinking tl;dr, here, briefly, are the main points again:
- Easy to install (your grandmother could do it)
- Easy to use (maybe not your grandmother, but a 10-year-old for sure)
- Rapid upload and download in parallel, multi-chunked threads
- Checksum optimization to avoid redundant uploads and downloads
- Efficient scripting with wildcards and regular expressions
- Preview mode (so you don’t screw things up)
JFrog CLI ’ing with Artifactory
Using JFrog CLI with Artifactory is almost identical to how you used Artifactory CLI. The only significant difference is that all commands start with “jfrog”, and the basic command modifier is “rt” instead of “art”. So if you previously wrote
Now you write
jfrog rt <something>
JFrog CLI ’ing with Bintray
The big change here is that previously, there was no CLI to work with Bintray. Now there is! In addition to doing all the things you can do with Artifactory (uploading and downloading files), you can download the complete set of files in a version, publish a version, do neat stuff with packages, manage entitlements, access keys and download URLs, and even sign files or versions with your GPG key… and more.
JFrog CLI works with Artifactory and Bintray through their respective REST APIs, basically, it simple for you to do the common tasks represented by its commands.
Let’s use a couple of examples to see how easy it is to work with JFrog CLI. Let’s
- Create a new package in Bintray called “super-frog” in a repository called “my-swamp”
- Upload all zip files in the current directory to version 1.0.0 of the package
- Create an entitlement for version 1.0.0 with read and write access and access key “access-key-1”
>_ jfrog bt package-create my-org/my-swamp/super-frog
>_ jfrog bt upload "*.zip" my-org/my-swamp/super-frog/1.
>_ jfrog bt ent create my-org/my-swamp/super-frog/1.
0.0 --access=rw --keys=access-key-1
Wasn’t that easy?
Let’s try something a bit more complicated. We’re going to run a build cycle through Artifactory and then, publish the build artifacts to Bintray.
- Download dependencies from Artifactory to run the build
- Execute the build script (this has nothing to do with JFrog CLI)
- Upload the build artifacts (which are all found under the build directory) to a staging repository in Artifactory
- Upload the build artifacts to Bintray
>_ jfrog rt download frog-dependencies/super-
>_ jfrog rt upload build/ staging-local/super-frog/2.0.0/
>_ jfrog bt upload build/ my-org/my-swamp/super-frog/2.
Now it doesn’t get much easier than that.
Ready to download and start CLI’ing? Download JFrog CLI.
Want the details?