Search code examples
artifactoryjfrog-cli

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?


Solution

  • You can use the JFrog Cli search command.

    jfrog rt s "testproject/01_Develop/01_CI/HPCC-Package-*.zip"
    

    The search command will return a list of paths which you can then sort using external tools such as jq.