Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I download last artifact in Artifactory?

I have some artifacts in Artifactory (OpenSource):

enter image description here

I can download an artifact from using jfrog CLI:

jfrog rt config --user=admin --password=**** --url=http://foo:8081/artifactory
jfrog rt download testproject/01_Develop/01_CI/HPCC-Package-70.zip --flat=true

How can I download the LATEST(highest number) artifact?

like image 708
Oscar Foley Avatar asked Dec 28 '16 12:12

Oscar Foley


1 Answers

JFrog CLI recently started supporting 3 new options from many of the Artifactory commands: --sort-by --sort-order and --limit.

You can use these options to search, download, copy, move or delete the latest artifact created in Artifactory. For example, to download the latest file uploaded to the all-my-frogs folder in the my-local-repo repository, use the following command:

jfrog rt dl  "my-local-repo/all-my-frogs/" --sort-by=created
--sort-order=desc --limit=1
like image 189
Eyal Ben Moshe Avatar answered Sep 19 '22 18:09

Eyal Ben Moshe