I think the file set should be evaluated on the slave using e.g. hudson.remoting.Callable and copied to the master using getFileLocally. Currently, the file set is evaluated on the master using the workspace path of the slave. That's the problem. I've attached a basic example of a Callable. Is anybody working on the issue? Otherwise I'll fix the issue.

launcher.getChannel().call(new RemoteFileTask(build.getWorkspace().getRemote(), vars.expand(filePath)))

public class RemoteFileTask implements Callable<String, IOException> {

    private String basePath;
    private String filePath;

    public RemoteFileTask(String basePath, String filePath) {
        this.filePath = filePath;
        this.basePath = basePath;
    }

    public String call() throws IOException {
        FileSet fileSet = Util.createFileSet(new File(basePath),
                filePath, null);
        return fileSet.iterator().next().toString();
    }
}
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