mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-10-29 12:35:19 +00:00
Slave to Agent renaming - Javadocs and logs
This commit is contained in:
1 parent
079755c52e
commit
320e6c0702
77 files changed
+268
-268
No files matched your search
@@ -127,7 +127,7 @@ import org.jenkinsci.remoting.RoleSensitive;
|
||||
*
|
||||
* <p>
|
||||
* Unlike {@link File}, which always implies a file path on the current computer,
|
||||
* {@link FilePath} represents a file path on a specific slave or the master.
|
||||
* {@link FilePath} represents a file path on a specific agent or the master.
|
||||
*
|
||||
* Despite that, {@link FilePath} can be used much like {@link File}. It exposes
|
||||
* a bunch of operations (and we should add more operations as long as they are
|
||||
@@ -191,19 +191,19 @@ public final class FilePath implements Serializable {
|
||||
/**
|
||||
* When this {@link FilePath} represents the remote path,
|
||||
* this field is always non-null on master (the field represents
|
||||
* the channel to the remote slave.) When transferred to a slave via remoting,
|
||||
* the channel to the remote agent.) When transferred to a agent via remoting,
|
||||
* this field reverts back to null, since it's transient.
|
||||
*
|
||||
* When this {@link FilePath} represents a path on the master,
|
||||
* this field is null on master. When transferred to a slave via remoting,
|
||||
* this field is null on master. When transferred to a agent via remoting,
|
||||
* this field becomes non-null, representing the {@link Channel}
|
||||
* back to the master.
|
||||
*
|
||||
* This is used to determine whether we are running on the master or the slave.
|
||||
* This is used to determine whether we are running on the master or the agent.
|
||||
*/
|
||||
private transient VirtualChannel channel;
|
||||
|
||||
// since the platform of the slave might be different, can't use java.io.File
|
||||
// since the platform of the agent might be different, can't use java.io.File
|
||||
private final String remote;
|
||||
|
||||
/**
|
||||
@@ -259,7 +259,7 @@ public final class FilePath implements Serializable {
|
||||
return base.remote+'/'+rel.replace('\\','/');
|
||||
} else {
|
||||
// need this replace, see Slave.getWorkspaceFor and AbstractItem.getFullName, nested jobs on Windows
|
||||
// slaves will always have a rel containing at least one '/' character. JENKINS-13649
|
||||
// agents will always have a rel containing at least one '/' character. JENKINS-13649
|
||||
return base.remote+'\\'+rel.replace('/','\\');
|
||||
}
|
||||
}
|
||||
@@ -802,14 +802,14 @@ public final class FilePath implements Serializable {
|
||||
listener.getLogger().println(message);
|
||||
|
||||
if (isRemote()) {
|
||||
// First try to download from the slave machine.
|
||||
// First try to download from the agent machine.
|
||||
try {
|
||||
act(new Unpack(archive));
|
||||
timestamp.touch(sourceTimestamp);
|
||||
return true;
|
||||
} catch (IOException x) {
|
||||
if (listener != null) {
|
||||
x.printStackTrace(listener.error("Failed to download " + archive + " from slave; will retry from master"));
|
||||
x.printStackTrace(listener.error("Failed to download " + archive + " from agent; will retry from master"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user