/** * Gets the directory where this build is being built. * * <p> * Note to implementors: to control where the workspace is created, override * {@link AbstractBuildExecution#decideWorkspace(Node,WorkspaceList)}. * * @return * null if the workspace is on an agent that's not connected. Note that once the build is completed, * the workspace may be used to build something else, so the value returned from this method may * no longer show a workspace as it was used for this build. * @since 1.319 */ public final @CheckForNull FilePath getWorkspace() { if (workspace==null) return null; Node n = getBuiltOn(); if (n==null) return null; return n.createPath(workspace); }
private FilePath $(String file) { return node.createPath(file); } }
private FilePath $(String file) { return node.createPath(file); } }
private FilePath $(String file) { return node.createPath(file); } }
private FilePath $(String file) { return node.createPath(file); } }
private FilePath $(String file) { return node.createPath(file); } }
public FilePath superCreatePath(String absolutePath) { return super.createPath(absolutePath); }
/** * Gets the directory where this build is being built. * * <p> * Note to implementors: to control where the workspace is created, override * {@link AbstractRunner#decideWorkspace(Node,WorkspaceList)}. * * @return * null if the workspace is on a slave that's not connected. Note that once the build is completed, * the workspace may be used to build something else, so the value returned from this method may * no longer show a workspace as it was used for this build. * @since 1.319 */ public final FilePath getWorkspace() { if (workspace==null) return null; Node n = getBuiltOn(); if (n==null) return null; return n.createPath(workspace); }
/** * Gets the directory where this build is being built. * * <p> * Note to implementors: to control where the workspace is created, override * {@link AbstractBuildExecution#decideWorkspace(Node,WorkspaceList)}. * * @return * null if the workspace is on an agent that's not connected. Note that once the build is completed, * the workspace may be used to build something else, so the value returned from this method may * no longer show a workspace as it was used for this build. * @since 1.319 */ public final @CheckForNull FilePath getWorkspace() { if (workspace==null) return null; Node n = getBuiltOn(); if (n==null) return null; return n.createPath(workspace); }
/** * Gets the directory where this build is being built. * * <p> * Note to implementors: to control where the workspace is created, override * {@link AbstractRunner#decideWorkspace(Node,WorkspaceList)}. * * @return * null if the workspace is on a slave that's not connected. Note that once the build is completed, * the workspace may be used to build something else, so the value returned from this method may * no longer show a workspace as it was used for this build. * @since 1.319 */ public final FilePath getWorkspace() { if (workspace==null) return null; Node n = getBuiltOn(); if (n==null) return null; return n.createPath(workspace); }
/** * Gets the directory where this build is being built. * * <p> * Note to implementors: to control where the workspace is created, override * {@link AbstractRunner#decideWorkspace(Node,WorkspaceList)}. * * @return * null if the workspace is on a slave that's not connected. Note that once the build is completed, * the workspace may be used to build something else, so the value returned from this method may * no longer show a workspace as it was used for this build. * @since 1.319 */ public final FilePath getWorkspace() { if (workspace==null) return null; Node n = getBuiltOn(); if (n==null) return null; return n.createPath(workspace); }
/** * Gets the directory where this build is being built. * * <p> Note to implementors: to control where the workspace is created, * override {@link AbstractRunner#decideWorkspace(Node,WorkspaceList)}. * * @return null if the workspace is on a slave that's not connected. Note * that once the build is completed, the workspace may be used to build * something else, so the value returned from this method may no longer show * a workspace as it was used for this build. * @since 1.319 */ public final FilePath getWorkspace() { if (workspace == null) { return null; } Node n = getBuiltOn(); if (n == null) { return null; } return n.createPath(workspace); }
/** * Checks if this {@link DockerClient} instance is running inside a container and returns the id of the container * if so. * * @return an optional string containing the <strong>container id</strong>, or <strong>absent</strong> if * it isn't containerized. * @see <a href="http://stackoverflow.com/a/25729598/12916">Discussion</a> */ public Optional<String> getContainerIdIfContainerized() throws IOException, InterruptedException { if (node == null) { return Optional.absent(); } FilePath cgroupFile = node.createPath("/proc/self/cgroup"); if (cgroupFile == null || !cgroupFile.exists()) { return Optional.absent(); } return ControlGroup.getContainerId(cgroupFile); }
@Override public @CheckForNull FilePath createPath(String absolutePath) { initPython(); if (pexec.isImplemented(9)) { return (FilePath) pexec.execPython("create_path", absolutePath); } else { return super.createPath(absolutePath); } }
if (home != null) { if (node != null) { FilePath homeFP = node.createPath(home); if (homeFP != null) { return homeFP.child("bin/docker").getRemote();
if (home != null) { if (node != null) { FilePath homeFP = node.createPath(home); if (homeFP != null) { return homeFP.child("bin/docker").getRemote();
String path = pathIterator.next(); try{ FilePath workspace = node.createPath(path); if(!workspace.exists()){ pathIterator.remove();
context = builtOn.createPath(expandAll(getBuildContext())); } else { context = new FilePath(new File(expandAll(getBuildContext())));