Is there a way to archive symbolic links that point outside a repository in Jenkins?

jenkins

Solution

There is a workaround: Create an archive-file (like tar archive) of the files you want Jenkins to archive. The tar archive is capable of storing symlinks as symlinks.

I myself always create tar archives of the files I want Jenkins to store. It also retains file permissions which seem to be difficult to Jenkins.

The downside is you need to untar the archive in the job where it is used, but that's easy.

If you also compress the tar archive, your archived artifacts do not take much space.

Problem

I have a Subversion repository which uses symbolic links to reference files / directories which are not part of the repository. For example: ``` logs/ ---> /somewhere/else/in/filesystem/logs/ ``` In terms of Subversion, this works with no issues: They become valid when installed on a valid system. However, when it comes to archiving the artifact in Jenkins, this throws a FileNotFoundException due to the archiver trying to resolve the symbolic link. Ideally, I would like jenkins to preserve the symbolic link when creating the archive. Is this possible? Two relevant issue reports: - https://issues.jenkins-ci.org/browse/JENKINS-5993 - https://issues.jenkins-ci.org/browse/JENKINS-5597 If not, the alternative would seem to be to remove the symbolic links from the repository and change the code to not require them.

Original source