@CheckForNull public FilePath getRootPath() { final SlaveComputer computer = getComputer(); if (computer == null) { // if computer is null then channel is null and thus we were going to return null anyway return null; } else { return createPath(StringUtils.defaultString(computer.getAbsoluteRemoteFs(), remoteFS)); } }
/** * Just for restFul api. * Returns the remote FS root absolute path or {@code null} if the agent is off-line. The absolute path may change * between connections if the connection method does not provide a consistent working directory and the node's * remote FS is specified as a relative path. * @see #getAbsoluteRemoteFs() * @return the remote FS root absolute path or {@code null} if the agent is off-line or don't have connect permission. * @since 2.125 */ @Exported @Restricted(DoNotUse.class) @CheckForNull public String getAbsoluteRemotePath() { if(hasPermission(CONNECT)) { return getAbsoluteRemoteFs(); } else { return null; } }
@CheckForNull public FilePath getRootPath() { final SlaveComputer computer = getComputer(); if (computer == null) { // if computer is null then channel is null and thus we were going to return null anyway return null; } else { return createPath(StringUtils.defaultString(computer.getAbsoluteRemoteFs(), remoteFS)); } }
final EnvVars cookie = _cookie = EnvVars.createCookie(); pb.environment().putAll(cookie); pb.environment().put("WORKSPACE", StringUtils.defaultString(computer.getAbsoluteRemoteFs(), node.getRemoteFS())); //path for local slave log