本文整理了Java中hudson.model.Node.createPath()
方法的一些代码示例,展示了Node.createPath()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.createPath()
方法的具体详情如下:
包路径:hudson.model.Node
类名称:Node
方法名:createPath
[英]Gets the FilePath on this node.
[中]获取此节点上的文件路径。
代码示例来源:origin: jenkinsci/jenkins
/**
* 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);
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
private FilePath $(String file) {
return node.createPath(file);
}
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
private FilePath $(String file) {
return node.createPath(file);
}
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
private FilePath $(String file) {
return node.createPath(file);
}
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
private FilePath $(String file) {
return node.createPath(file);
}
}
代码示例来源:origin: hudson/hudson-2.x
private FilePath $(String file) {
return node.createPath(file);
}
}
代码示例来源:origin: org.jenkins-ci.plugins/python-wrapper
public FilePath superCreatePath(String absolutePath) {
return super.createPath(absolutePath);
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* 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);
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
/**
* 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);
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* 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);
}
代码示例来源:origin: hudson/hudson-2.x
/**
* 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);
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
/**
* 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);
}
代码示例来源:origin: jenkinsci/docker-workflow-plugin
/**
* 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);
}
代码示例来源:origin: org.jenkins-ci.plugins/python-wrapper
@Override
public @CheckForNull
FilePath createPath(String absolutePath) {
initPython();
if (pexec.isImplemented(9)) {
return (FilePath) pexec.execPython("create_path", absolutePath);
} else {
return super.createPath(absolutePath);
}
}
代码示例来源:origin: org.jenkins-ci.plugins/docker-commons
if (home != null) {
if (node != null) {
FilePath homeFP = node.createPath(home);
if (homeFP != null) {
return homeFP.child("bin/docker").getRemote();
代码示例来源:origin: jenkinsci/docker-commons-plugin
if (home != null) {
if (node != null) {
FilePath homeFP = node.createPath(home);
if (homeFP != null) {
return homeFP.child("bin/docker").getRemote();
代码示例来源:origin: org.jenkins-ci.plugins/disk-usage
String path = pathIterator.next();
try{
FilePath workspace = node.createPath(path);
if(!workspace.exists()){
pathIterator.remove();
代码示例来源:origin: jenkinsci/docker-build-publish-plugin
context = builtOn.createPath(expandAll(getBuildContext()));
} else {
context = new FilePath(new File(expandAll(getBuildContext())));
内容来源于网络,如有侵权,请联系作者删除!