问题
Is it possible to use the 'copy artifact' plugin to copy an artifact from a job that ran on master to a downstream job that runs on a slave node?
I'm getting an error on the slave that says: hudson.util.IOException2: hudson.util.IOException2: Failed to extract /srv/hudson/jobs/myproject/builds/2011-04-29_10-28-54/archive/myartifact.foo
Obviously that path is not valid, as it points to the artifact folder on master.
Am I missing something or is this just not possible?
回答1:
Yes, it is possible. You can use the Copy Artifact Plugin to copy any artifact to the slave.
For a first test I recommend to
- set up a job just with one 'Copy artifacts from another project' step
- set the 'Project name' to a job with your artifact
- set 'Which build' to 'Last successful build' (ensure there is one)
- keep the 'Artifacts to copy' and 'Target directory' empty to copy all artifacts to the slave workspace directory
来源:https://stackoverflow.com/questions/5830334/hudson-copy-artifact-from-master-to-slave-fails