Jesse Glick commented on Improvement JENKINS-26185

Not sure why you were using step when you could be using the specialized archive step, but either should work the same, just a matter of style.

It sounds like there are two issues here.

First of all, ArtifactUnarchiverStepExecution.copy does not appear to handle symlinks as written. This should be filed as a separate bug, especially if you can find a quick way to reproduce on a minimal test case. I suspect the best that can be done against current Jenkins core versions is to skip over symlinks (emitting a warning from the step); VirtualFile can be asked isFile, which I think would be false for a symlink (even if its target was an existing file), but it would require a core API change for it to report the target of the symlink.

Second, as you say the whole agent/dist/ subdirectory should never have been archived to begin with. I suspect something wrong with your include/exclude patterns, which ought to be reproducible in a freestyle project with the same workspace contents and an archiving post-build action. Try exclude: 'agent/dist/' rather than exclude: 'agent/dist/**/*'; they may seem synonymous but the behavior (implemented in Ant) might be different where symlinks are concerned. (agent/dist/ is merely shorthand for agent/dist/**, meaning “anything starting with agent/dist/, so prune at agent/dist”. agent/dist/**/* means “look through all subdirectories of agent/dist and match all individual files you find in them”.)

Also rather than

unarchive mapping: ['**/*': '.']

I would use


unarchive mapping: ['desiredFileOrDir': '.']

(known to work) or

unarchive mapping: ['*': '.']

(might work) to see if that makes any difference. Mapping '**/*': '.' is probably wrong here, since this would mean to copy all files at whatever directory depth into the root of the workspace (“flattening”).

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to