use of com.cloudbees.jenkins.support.api.FilePathContent in project support-core-plugin by jenkinsci.
the class ProcFilesRetriever method addUnixContents.
protected void addUnixContents(@NonNull Container container, @NonNull final Node node) {
Computer c = node.toComputer();
if (c == null || c.isOffline()) {
return;
}
// fast path bailout for Windows
if (!Boolean.TRUE.equals(c.isUnix())) {
return;
}
SystemPlatform nodeSystemPlatform = getSystemPlatform(node);
if (!SystemPlatform.LINUX.equals(nodeSystemPlatform)) {
return;
}
String name;
if (node instanceof Jenkins) {
name = "master";
} else {
name = "slave/" + node.getNodeName();
}
for (Map.Entry<String, String> procDescriptor : getFilesToRetrieve().entrySet()) {
container.add(new FilePathContent("nodes/" + name + "/proc/" + procDescriptor.getValue(), new FilePath(c.getChannel(), procDescriptor.getKey())));
}
afterAddUnixContents(container, node, name);
}
Aggregations