jfrog/setup-jfrog-cli

Unable to fetch the latest version when using --build flag

santhoshjfrog opened this issue · 1 comments

Describe the bug
When trying to download the artifacts from Arifactory using Jfrog CLI and specifying the --build option and it is expected to fetch the latest version but it is not fetching the latest version.

To Reproduce
Steps to reproduce the issue:
Uploaded 3 artifacts to Artifactory in the following order:

  1. EDP-edp-libraries-854115_20210310.1.tar.gz
  2. EDP-edp-libraries-1152295_20210602.1.tar.gz
  3. EDP-EDP-libraries-1163740_20210604.1.tar.gz
    To upload the package and publish the build, we can use the below command:
    jfrog rt u EDP-edp-libraries-854115_20210310.1.tar.gz divija-build-test --build-name=EDP-edp-libraries --build-number=854115_20210310.1
    jfrog rt bp EDP-edp-libraries 854115_20210310.1

jfrog rt u EDP-edp-libraries-1152295_20210602.1.tar.gz divija-build-test --build-name=EDP-edp-libraries --build-number=1152295_20210602.1
jfrog rt bp EDP-edp-libraries 1152295_20210602.1

jfrog rt u EDP-edp-libraries-1163740_20210604.1.tar.gz divija-build-test--build-name=EDP-edp-libraries --build-number=1163740_20210604.1
jfrog rt bp EDP-edp-libraries 1163740_20210604.1

Downloaded the packages from Artifactory using JFrog CLI:
When we download the package using the below command:
jfrog rt dl divija-build-test/ --build EDP-edp-libraries*

with "--build EDP-edp-libraries" option --> the first uploaded package (854115_20210310.1.tar.gz) is resolved instead of the latest pacakge (1163740_20210604.1.tar.gz).

According to the documentationhttps://www.jfrog.com/confluence/display/CLI/CLI+for+JFrog+Artifactory#CLIforJFrogArtifactory-DownloadingFiles, it says when we use --build flag and If we do not specify the build number, the artifacts are filtered by the latest build number. So we are expecting to get the latest artifact version.

Expected behavior
It is expected to download the latest artifact version that was published. In our case latest package (1163740_20210604.1.tar.gz) should be resolved instead of the first uploaded package (854115_20210310.1.tar.gz)

Screenshots
Screen Shot 2021-06-14 at 4 16 44 PM
testing-1 (1)

Versions

  • JFrog CLI version: 1.48.1
  • Artifactory Version: 7.19.8

Submitted in wrong channel. Opened in jfrog/jfrog-cli#1110