[JIRA] [shelve-project-plugin] (JENKINS-10986) Symlinks in a shelved project are archived as directories on Unix platforms

9 views
Skip to first unread message

james@howeswho.co.uk (JIRA)

unread,
May 12, 2015, 12:02:02 PM5/12/15
to jenkinsc...@googlegroups.com
James Howe commented on Bug JENKINS-10986
 
Re: Symlinks in a shelved project are archived as directories on Unix platforms

From my testing, it appears that any job that's been unshelved will break Jenkins if loaded after 1.597, as the layout migration fails.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

james@howeswho.co.uk (JIRA)

unread,
May 12, 2015, 12:13:01 PM5/12/15
to jenkinsc...@googlegroups.com
James Howe edited a comment on Bug JENKINS-10986
From my testing, it appears that any job that's been unshelved will break Jenkins if loaded after 1.597, as the layout migration fails.


Failed to update hudson.model.FreeStyleProject@61d2876c[Job1] lastSuccessfulBuild permalink for Job1 #7
java.nio.file.DirectoryNotEmptyException: /var/lib/jenkins/jobs/Job1/builds/lastSuccessfulBuild
at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:242)
at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103)
at java.nio.file.Files.delete(Files.java:1079)

tom.ghyselinck@excentis.com (JIRA)

unread,
Jul 14, 2016, 4:12:01 AM7/14/16
to jenkinsc...@googlegroups.com

Hi guys,

This is a really big issue for us too.

Using `.symlink` files can be tricky. There is always (an whether small or not) possibility that the `.symlink` file already exists....

Why not using another archiver instead of `zip`?
For example `tar` + `gzip` is supported on most platforms.

Another safe procedure is to create the `zip` archive as follows:

  1. Add a subfolder and store the actual Job files here instead of in the archive root (excluding the symlinks!)
  2. Add a file containing all symlinks (relative to the Job root folder)

I.e.

<archive>.zip
  +- <actual_archive_contents>
  |    +- dir1
  |    +- dir2
  |    +- file1
  |    +- file2
  |    +- ...
  |
  +- symlinks.map

where symlinks.map contains all the symlinks (relative to <actual_archive_contents>)

This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

pibeitz@gmail.com (JIRA)

unread,
Jul 20, 2018, 11:56:08 AM7/20/18
to jenkinsc...@googlegroups.com
Pierre Beitz assigned an issue to Pierre Beitz
 
Jenkins / Bug JENKINS-10986
Change By: Pierre Beitz
Assignee: ashlux Pierre Beitz
This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)

pibeitz@gmail.com (JIRA)

unread,
Jul 20, 2018, 11:57:04 AM7/20/18
to jenkinsc...@googlegroups.com
Pierre Beitz commented on Bug JENKINS-10986
 
Re: Symlinks in a shelved project are archived as directories on Unix platforms

2.1 release switched to a tar for the archive which means the symlinks will now be kept.

pibeitz@gmail.com (JIRA)

unread,
Jul 20, 2018, 11:57:05 AM7/20/18
to jenkinsc...@googlegroups.com
Pierre Beitz started work on Bug JENKINS-10986
 
Change By: Pierre Beitz
Status: Open In Progress

pibeitz@gmail.com (JIRA)

unread,
Jul 20, 2018, 11:57:05 AM7/20/18
to jenkinsc...@googlegroups.com

pibeitz@gmail.com (JIRA)

unread,
Jul 20, 2018, 11:57:05 AM7/20/18
to jenkinsc...@googlegroups.com

pibeitz@gmail.com (JIRA)

unread,
Jul 20, 2018, 11:57:07 AM7/20/18
to jenkinsc...@googlegroups.com

valentin.baranov@netcracker.com (JIRA)

unread,
Nov 2, 2018, 10:31:02 AM11/2/18
to jenkinsc...@googlegroups.com
Valentin Baranov commented on Bug JENKINS-10986
 
Re: Symlinks in a shelved project are archived as directories on Unix platforms

Hi guys.

When can we expect this fix to be released? We extremely need it

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

pibeitz@gmail.com (JIRA)

unread,
Nov 5, 2018, 6:54:06 AM11/5/18
to jenkinsc...@googlegroups.com

Valentin Baranov

This issue is fixed in the plugin. There is however an issue in Jenkins core with the tar function breaking symlinks: https://issues.jenkins-ci.org/browse/JENKINS-52781

I made a fix for this, and there is a PR waiting for review here: https://github.com/jenkinsci/jenkins/pull/3569

Reply all
Reply to author
Forward
0 new messages