Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-50823

Unable to download latest artifact from snapshot repository

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • artifactory-plugin
    • None

      Unable to download latest artifact from snapshot repository

       

      node('cdPipeline'){
      def server = Artifactory.server "artifactory_lower_prod_server"
      def downloadSpec = """{
      "files": [
      {

      "pattern": "snapshot-local/<PATH>/2018.01.0-SNAPSHOT/wibtp-zelle-2018.01.0-SNAPSHOT.tar",
      "target": "/var/tmp/kiran/",
      "flat": true

      }
      ]
      }
      }"""
      println(downloadSpec)
      server.download(downloadSpec)

      }

       

      This works well with release repositories, as the tar file pattern would be *tar

          [JENKINS-50823] Unable to download latest artifact from snapshot repository

          Kiran Kumar added a comment -

          eyalbe

          Do we have any update on this ?

           

          Kiran Kumar added a comment - eyalbe Do we have any update on this ?  

          When using File Specs to download artifacts, the pattern defined in the File Spec is translated into AQL to fetch the list of artifacts. The artifacts are then downloaded one by one. Maven's snapshot convention is supported by Artifactory, but only for maven builds.

          We are planning to enhance the File Specs schema with new sort-by, sort-order and limit properties. These properties are already supported by JFrog CLI. This will allow downloading, among other things, the latest published artifact, which matchers the pattern.

          Eyal Ben Moshe added a comment - When using File Specs to download artifacts, the pattern defined in the File Spec is translated into AQL to fetch the list of artifacts. The artifacts are then downloaded one by one. Maven's snapshot convention is supported by Artifactory, but only for maven builds. We are planning to enhance the File Specs schema with new sort-by, sort-order and limit properties. These properties are already supported by JFrog CLI. This will allow downloading, among other things, the latest published artifact, which matchers the pattern.

          Kiran Kumar added a comment -

          eyalbe

          So, you are saying that the AQL doesn't support the way Artifactory supports to download the SNAPSHOT Artifact ?

          File Specs would need to be changed in order to support fetching the latest artifact.

          Could you please let us know when can we expect this change ?

          Also, with JFrog CLI the above filespec pattern work ?

          Kiran Kumar added a comment - eyalbe So, you are saying that the AQL doesn't support the way Artifactory supports to download the SNAPSHOT Artifact ? File Specs would need to be changed in order to support fetching the latest artifact. Could you please let us know when can we expect this change ? Also, with JFrog CLI the above filespec pattern work ?

          We don't yet have an ETA for this, but it is definitely on our roadmap. JFrog CLI supports sort-by, sort-order and linit bith as File Spec properties and command options. That's the way to get the latest artifact. The File Spec schema for Jenkins will eventually match JFrog CLI's.

          The File Spec you shared will not work.

          Eyal Ben Moshe added a comment - We don't yet have an ETA for this, but it is definitely on our roadmap. JFrog CLI supports sort-by, sort-order and linit bith as File Spec properties and command options. That's the way to get the latest artifact. The File Spec schema for Jenkins will eventually match JFrog CLI's. The File Spec you shared will not work.

            eyalbe Eyal Ben Moshe
            kiran9456 Kiran Kumar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: