/** * Gets the {@link FilePath} on this node. */ public @CheckForNull FilePath createPath(String absolutePath) { VirtualChannel ch = getChannel(); if(ch==null) return null; // offline return new FilePath(ch,absolutePath); }
/** * Estimates the clock difference with this agent. * * @return * always non-null. * @throws InterruptedException * if the operation is aborted. */ public ClockDifference getClockDifference() throws IOException, InterruptedException { VirtualChannel channel = getChannel(); if(channel==null) throw new IOException(getNodeName()+" is offline"); return channel.call(getClockDifferenceCallable()); }
throw new NullPointerException("no such build node: " + build.getBuiltOnStr()); throw new NullPointerException("no workspace from node " + node + " which is computer " + node.toComputer() + " and has channel " + node.getChannel());
/** * Gets the {@link FilePath} on this node. */ public @CheckForNull FilePath createPath(String absolutePath) { VirtualChannel ch = getChannel(); if(ch==null) return null; // offline return new FilePath(ch,absolutePath); }
/** * Determines the platform of the given node. */ public static Platform of(Node n) throws IOException, InterruptedException, DetectionFailedException { return n.getChannel().call(new Callable<Platform, DetectionFailedException>() { @Override public Platform call() throws DetectionFailedException { return current(); } }); }
/** * Gets the {@link FilePath} on this node. */ public FilePath createPath(String absolutePath) { VirtualChannel ch = getChannel(); if(ch==null) return null; // offline return new FilePath(ch,absolutePath); }
/** * Determines the platform of the given node. */ public static Platform of(Node n) throws IOException,InterruptedException,DetectionFailedException { return n.getChannel().call(new Callable<Platform,DetectionFailedException>() { public Platform call() throws DetectionFailedException { return current(); } }); }
/** * Gets the {@link FilePath} on this node. */ public FilePath createPath(String absolutePath) { VirtualChannel ch = getChannel(); if (ch == null) { return null; // offline } return new FilePath(ch, absolutePath); }
/** * Gets the {@link FilePath} on this node. */ public FilePath createPath(String absolutePath) { VirtualChannel ch = getChannel(); if(ch==null) return null; // offline return new FilePath(ch,absolutePath); }
/** * Gets the {@link FilePath} on this node. */ public FilePath createPath(String absolutePath) { VirtualChannel ch = getChannel(); if(ch==null) return null; // offline return new FilePath(ch,absolutePath); }
/** * Determines the CPU of the given node. */ public static CPU of(Node n) throws IOException,InterruptedException, DetectionFailedException { return n.getChannel().call(new Callable<CPU,DetectionFailedException>() { public CPU call() throws DetectionFailedException { return current(); } }); }
/** * Determines the CPU of the given node. */ public static CPU of(Node n) throws IOException, InterruptedException, DetectionFailedException { return n.getChannel().call(new Callable<CPU, DetectionFailedException>() { @Override public CPU call() throws DetectionFailedException { return current(); } }); }
/** * Determines the platform of the given node. */ public static Platform of(Node n) throws IOException,InterruptedException,DetectionFailedException { return n.getChannel().call(new Callable<Platform,DetectionFailedException>() { public Platform call() throws DetectionFailedException { return current(); } }); }
/** * Determines the CPU of the given node. */ public static CPU of(Node n) throws IOException,InterruptedException, DetectionFailedException { return n.getChannel().call(new Callable<CPU,DetectionFailedException>() { public CPU call() throws DetectionFailedException { return current(); } }); }
/** * Determines the CPU of the given node. */ public static CPU of(Node n) throws IOException,InterruptedException, DetectionFailedException { return n.getChannel().call(new Callable<CPU,DetectionFailedException>() { public CPU call() throws DetectionFailedException { return current(); } }); }
/** * Determines the platform of the given node. */ public static Platform of(Node n) throws IOException,InterruptedException,DetectionFailedException { return n.getChannel().call(new GetCurrentPlatform()); }
/** * Determines the CPU of the given node. */ public static CPU of(Node n) throws IOException,InterruptedException, DetectionFailedException { return n.getChannel().call(new GetCurrentCPU()); }
@SuppressWarnings("serial") private static AndroidSdk getAndroidSdkForNode(Node node, final String androidHome, final String androidSdkHome) throws IOException, InterruptedException { final VirtualChannel channel = node.getChannel(); if (channel == null) { throw new BuildNodeUnavailableException(); } return channel.call(new MasterToSlaveCallable<AndroidSdk, IOException>() { public AndroidSdk call() throws IOException { return new AndroidSdk(androidHome, androidSdkHome); } }); }
private FilePath getFilePath(final AbstractBuild<?, ?> build) { final FilePath ws = build.getWorkspace(); if (ws == null) { final Node node = build.getBuiltOn(); if (node == null) { throw new RuntimeException("no such build node: " + build.getBuiltOnStr()); } throw new RuntimeException("no workspace from node " + node + " which is computer " + node.toComputer() + " and has channel " + node.getChannel()); } return ws; }
@SuppressFBWarnings("NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE") private Installable getInstallable(Node node) throws IOException, InterruptedException { // Get the Go release that we want to install GolangRelease release = getConfiguredRelease(); if (release == null) { return null; } // Gather properties for the node to install on String[] properties = node.getChannel().call(new GetSystemProperties("os.name", "os.arch", "os.version")); // Get the best matching install candidate for this node return getInstallCandidate(release, properties[0], properties[1], properties[2]); }