Issue Type: Bug Bug
Assignee: Unassigned
Components: copyartifact
Created: 01/Apr/14 10:11 PM
Description:

The copyartifact plugin fails to properly handle symlinks from a slave machine. When you create the symlink and archive it, the symlink returns a 404, and anything that tries to Copy Archive from the above project throws an exception.

Steps to reproduce:
Create a SLAVE NODE on a linux instance
Create a Job (fooProject) that has `Execute ssh` with the following

mkdir -p foo 
echo $BUILD_TAG > foo/bar 
ln -s $( readlink -f foo/bar ) foo/baz

Then Archive the Artifacts on `foo/**`
Execute job
Create a new project (barProject)
Copy artifacts from project (fooProject)
Execute and you will receive the following stack trace below:

ERROR: Failed to copy artifacts from tets with filter: **
hudson.util.IOException2: Failed to copy /Users/Shared/Jenkins/Home/jobs/tets/builds/2014-03-31_17-56-04/archive/foo/baz to /tmp/workspace/tets2/foo/baz
	at hudson.plugins.copyartifact.FingerprintingCopyMethod.copyOne(FingerprintingCopyMethod.java:107)
	at hudson.plugins.copyartifact.FingerprintingCopyMethod.copyAll(FingerprintingCopyMethod.java:68)
	at hudson.plugins.copyartifact.CopyArtifact.perform(CopyArtifact.java:368)
	at hudson.plugins.copyartifact.CopyArtifact.perform(CopyArtifact.java:306)
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:781)
	at hudson.model.Build$BuildExecution.build(Build.java:199)
	at hudson.model.Build$BuildExecution.doRun(Build.java:160)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:562)
	at hudson.model.Run.execute(Run.java:1665)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
	at hudson.model.ResourceController.execute(ResourceController.java:88)
	at hudson.model.Executor.run(Executor.java:246)
Caused by: java.io.FileNotFoundException: /Users/Shared/Jenkins/Home/jobs/tets/builds/2014-03-31_17-56-04/archive/foo/baz (No such file or directory)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(FileInputStream.java:138)
	at hudson.FilePath$34.invoke(FilePath.java:1797)
	at hudson.FilePath$34.invoke(FilePath.java:1792)
	at hudson.FilePath.act(FilePath.java:916)
	at hudson.FilePath.act(FilePath.java:889)
	at hudson.FilePath.copyTo(FilePath.java:1792)
	at hudson.plugins.copyartifact.FingerprintingCopyMethod.copyOne(FingerprintingCopyMethod.java:79)
	... 12 more
Build step 'Copy artifacts from another project' marked build as failure
Finished: FAILURE
Environment: Linux
Project: Jenkins
Priority: Major Major
Reporter: Steven Christou
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to