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

Preserve symlinks when copying artifacts

    XMLWordPrintable

Details

    Description

      When copying artifact using the Copy Artifact plugin, symlinks are replaced by the referred files or directory.

      It would be nice to have an option to preserve symlinks when copying artifacts.

      Attachments

        Issue Links

          Activity

            jglick Jesse Glick added a comment -

            Since ArtifactArchiver preserves symlinks, it is natural for CopyArtifact to do so as well.

            jglick Jesse Glick added a comment - Since ArtifactArchiver preserves symlinks, it is natural for CopyArtifact to do so as well.
            jglick Jesse Glick added a comment -

            FingerprintingCopyMethod is what traverses them. FilePathCopyMethod would not have this bug.

            jglick Jesse Glick added a comment - FingerprintingCopyMethod is what traverses them. FilePathCopyMethod would not have this bug.

            Code changed in jenkins
            User: Jesse Glick
            Path:
            src/main/java/hudson/plugins/copyartifact/FingerprintingCopyMethod.java
            src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java
            http://jenkins-ci.org/commit/copyartifact-plugin/085c4c9f1860df993a4617741b6b36fe9441b3a0
            Log:
            [FIXED JENKINS-20546] Preserve symlinks when copying artifacts.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/hudson/plugins/copyartifact/FingerprintingCopyMethod.java src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java http://jenkins-ci.org/commit/copyartifact-plugin/085c4c9f1860df993a4617741b6b36fe9441b3a0 Log: [FIXED JENKINS-20546] Preserve symlinks when copying artifacts.

            Code changed in jenkins
            User: ikedam
            Path:
            src/main/java/hudson/plugins/copyartifact/FingerprintingCopyMethod.java
            src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java
            http://jenkins-ci.org/commit/copyartifact-plugin/5cfa07b8bac9caeb664b9c99c1891e206a89fd3d
            Log:
            Merge pull request #57 from jglick/symlinks-JENKINS-20546

            JENKINS-20546 Preserve symlinks when copying artifacts

            Compare: https://github.com/jenkinsci/copyartifact-plugin/compare/68a64c09a744...5cfa07b8bac9

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: src/main/java/hudson/plugins/copyartifact/FingerprintingCopyMethod.java src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java http://jenkins-ci.org/commit/copyartifact-plugin/5cfa07b8bac9caeb664b9c99c1891e206a89fd3d Log: Merge pull request #57 from jglick/symlinks- JENKINS-20546 JENKINS-20546 Preserve symlinks when copying artifacts Compare: https://github.com/jenkinsci/copyartifact-plugin/compare/68a64c09a744...5cfa07b8bac9
            ikedam ikedam added a comment -

            The fix is released in copyartifact-1.35.
            It will be available in a day.

            ikedam ikedam added a comment - The fix is released in copyartifact-1.35. It will be available in a day.

            This is still broken in 1.36.1 if fingerprinting of artifacts is not enabled.

            slawomir_czarko Slawomir Czarko added a comment - This is still broken in 1.36.1 if fingerprinting of artifacts is not enabled.
            jglick Jesse Glick added a comment -

            So enable it. You can file a separate RFE for the other copy method.

            jglick Jesse Glick added a comment - So enable it. You can file a separate RFE for the other copy method.
            ikedam ikedam added a comment -

            Just unchecking "Fingerprint Artifacts" should never affect handling symlinks.
            It looks another issue, and please create a new ticket with details, such as environments, steps to reproduce and console outputs.

            ikedam ikedam added a comment - Just unchecking "Fingerprint Artifacts" should never affect handling symlinks. It looks another issue, and please create a new ticket with details, such as environments, steps to reproduce and console outputs.

            jglick ikedam
            Sorry for reopening the bug. My problem turned out to have nothing to do with Copy Artifacts Plugin.

            slawomir_czarko Slawomir Czarko added a comment - jglick ikedam Sorry for reopening the bug. My problem turned out to have nothing to do with Copy Artifacts Plugin.
            panjinjing Jinjing Pan added a comment -

            This issue is not resolved in Copy Artifact Plugin 1.37. Symlink are not copied.

            panjinjing Jinjing Pan added a comment - This issue is not resolved in Copy Artifact Plugin 1.37. Symlink are not copied.
            ikedam ikedam added a comment -

            panjinjing
            Please report more details (e.g. environments, steps to reproduce the problem).

            ikedam ikedam added a comment - panjinjing Please report more details (e.g. environments, steps to reproduce the problem).
            panjinjing Jinjing Pan added a comment -

            My problem is not related with this plugin. Sorry for reopening.

            panjinjing Jinjing Pan added a comment - My problem is not related with this plugin. Sorry for reopening.
            renwei Wei Ren added a comment -

            I am still seeing this issue on my two jenkins sites. One jenkins setup is Jenkins 1.651.3 + Copy Artifact Plugin 1.38, and the other jenkins setup is Jenkins 2.7.1 + Copy Aritifact Plugin 1.38. The OS of both setups is Ubuntu 14.04 LTS.

            Below are repro steps:
            1. One project P1 archives one file plus one symlink as its build artifacts like:
            directory1/file1, directory2/symlink2 where symlink2 is a link to ../directory1/file1.

            2. Another project P2 copies P1's artifacts to its workspace at the beginning of its build.

            Expected: both file1 and symlink2 are copied to P2's workspace.

            Actual: only file1 is copied to P2's workspace.

            Please let me know if you need more information.

            renwei Wei Ren added a comment - I am still seeing this issue on my two jenkins sites. One jenkins setup is Jenkins 1.651.3 + Copy Artifact Plugin 1.38, and the other jenkins setup is Jenkins 2.7.1 + Copy Aritifact Plugin 1.38. The OS of both setups is Ubuntu 14.04 LTS. Below are repro steps: 1. One project P1 archives one file plus one symlink as its build artifacts like: directory1/file1, directory2/symlink2 where symlink2 is a link to ../directory1/file1. 2. Another project P2 copies P1's artifacts to its workspace at the beginning of its build. Expected: both file1 and symlink2 are copied to P2's workspace. Actual: only file1 is copied to P2's workspace. Please let me know if you need more information.
            ikedam ikedam added a comment -

            renwei
            Your problem sounds rather link JENKINS-32832.
            Please check that.

            ikedam ikedam added a comment - renwei Your problem sounds rather link JENKINS-32832 . Please check that.
            renwei Wei Ren added a comment -

            Thank ikedam for the info. I will paste my issue there.

            renwei Wei Ren added a comment - Thank ikedam for the info. I will paste my issue there.

            People

              jglick Jesse Glick
              pbuyle pbuyle
              Votes:
              2 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: