Slave.remoteFS is intended to be an absolute path.

(Could consider throwing IAE if it does not appear to be.
Cannot easily call getRootPath().absolutize() since that requires a connection.)
This commit is contained in:
Jesse Glick committed 2013-06-13 09:41:19 -04:00
1 parent 63aba90db1
commit 98cf52b699
2 files changed
+6 -1

No files matched your search

+5 -1
View File
@@ -91,7 +91,7 @@ public abstract class Slave extends Node implements Serializable {
private final String description;
/**
* Path to the root of the workspace
* Absolute path to the root of the workspace
* from the view point of this node, such as "/hudson"
*/
protected final String remoteFS;
@@ -412,6 +412,10 @@ public abstract class Slave extends Node implements Serializable {
if(value.startsWith("\\\\") || value.startsWith("/net/"))
return FormValidation.warning(Messages.Slave_Network_Mounted_File_System_Warning());
if (!value.startsWith("\\") && !value.startsWith("/")) {
return FormValidation.error(Messages.Slave_the_remote_root_must_be_an_absolute_path());
}
return FormValidation.ok();
}
}
@@ -242,6 +242,7 @@ Slave.Launching={0} Launching slave agent
Slave.Network.Mounted.File.System.Warning=Are you sure you want to use network mounted file system for FS root? Note that this directory does not need to be visible to the master.
Slave.Remote.Director.Mandatory=Remote directory is mandatory
Slave.Terminated={0} slave agent was terminated
Slave.the_remote_root_must_be_an_absolute_path=The remote root must be an absolute path.
Slave.UnableToLaunch=Unable to launch the slave agent for {0}{1}
Slave.UnixSlave=This is a Unix slave
Slave.WindowsSlave=This is a Windows slave