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

Placeholder not replaced for uploads when files are symlinked

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • artifactory-plugin
    • None
    • Jenkins v2.60.3
      Artifactory plugin v2.12.2
      Using Generic Artifactory Configuration through the web app

      Placeholder syntax does not work when symlinks are involved.

       

      Spec:

      {
        "files": [{
          "pattern": "service-images/*-docker-image-(*).tar.gz",
          "target": "my-docker/{1}/
        }]
      }

       

      Where `service-images` is a symlink to another folder.

      In the logs I see

      For pattern: service-images/*-docker-image-(*).tar.gz 1 artifacts were found.
      Deploying artifact: https://<removed>/artifactory/my-docker/{1}/<hash>-docker-image-foo.tar.gz

      The file that gets uploaded to Artifactory is indeed the file I expect, I just expect the {1} to be replaced with `foo`. It looks like it's happy with the symlink when pattern matching but not when it goes to replace the placeholder which seems weird, if anything I would expect it to just break on the pattern matching.

      Current workaround is to copy the files into another folder created through the Jenkins build script, but would be nice to have it just work.

          [JENKINS-46766] Placeholder not replaced for uploads when files are symlinked

          Dima Nevelev added a comment - - edited

          Hi adelbert_target,
          Thanks for reporting this issue.
          We pushed the following commit to fix this issue:
          https://github.com/JFrogDev/build-info/commit/af31c45bcd61a9744aa1a529373e71a8d3578846
          ]Here's a download link to a snapshot version which includes the fix: 
          https://oss.jfrog.org/oss-snapshot-local/org/jenkins-ci/plugins/artifactory/2.12.3-SNAPSHOT/artifactory-2.12.3-20170911.162912-17.hpi 
          We'd appreciate your feedback for this fix.

          Dima Nevelev added a comment - - edited Hi adelbert_target , Thanks for reporting this issue. We pushed the following commit to fix this issue: https://github.com/JFrogDev/build-info/commit/af31c45bcd61a9744aa1a529373e71a8d3578846 ]Here's a download link to a snapshot version which includes the fix:  https://oss.jfrog.org/oss-snapshot-local/org/jenkins-ci/plugins/artifactory/2.12.3-SNAPSHOT/artifactory-2.12.3-20170911.162912-17.hpi   We'd appreciate your feedback for this fix.

            eyalbe Eyal Ben Moshe
            adelbert_target Adelbert Chang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: