Uploaded image for project: 'Jenkins Artifactory Plug-in'
  1. Jenkins Artifactory Plug-in
  2. HAP-1014

Unable to use placeholder in download spec target when downloading from virtual repository

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 2.13.1
    • Fix Version/s: 2.15.0
    • Component/s: Common
    • Environment:

      Server: Artifactory 5.6.0 on Windows 2012 R2 with Oracle JDK 1.8.0_152-b16.
      Client: Jenkins v2.7.4 on Windwos 10 with Oracle JRE 1.8.0_144-b01

      Description

      Using the Jenkins plugin, if I craft the following download spec:

      {
          "files": [
              {
                  "pattern": "generic-dev/path/to/published/artifact/version/(*)",
                  "flat": "true",
                  "recursive": "true",
                  "target": "{1}"
              }
          ]
      }
      

      ...I can provide that string to server.download() and I get all the files under the folder specified by pattern with a nice hierarchy mirroring that under the remote folder in the local folder. In other words:

      Path in Artifactory Relative path in file system's current folder
      generic-dev/path/to/published/artifact/version/setup.exe setup.exe
      generic-dev/path/to/published/artifact/version/ISSetupPrerequisites/{GUID}/redist.exe ISSetupPrerequisites/{GUID}/redist.exe

      So far so good. generic-dev is a local repository. generic is a virtual repository that aggregates generic-dev and other generic-XXX repositories.

      If I instead point to the generic virtual repository, all files are downloaded on top of one another to a single file called {1}, with the last file downloaded winning. In other words:

      Path in Artifactory Relative path in file system's current folder
      generic/path/to/published/artifact/version/setup.exe {1}
      generic/path/to/published/artifact/version/ISSetupPrerequisites/{GUID}/redist.exe {1}

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              romang Roman Gurevitch (Inactive)
              Reporter:
              odagenais@kinaxis.com Olivier Dagenais
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: