hudson.model.Node.createPath()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(6.2k)|赞(0)|评价(0)|浏览(163)

本文整理了Java中hudson.model.Node.createPath()方法的一些代码示例,展示了Node.createPath()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.createPath()方法的具体详情如下:
包路径:hudson.model.Node
类名称:Node
方法名:createPath

Node.createPath介绍

[英]Gets the FilePath on this node.
[中]获取此节点上的文件路径。

代码示例

代码示例来源:origin: jenkinsci/jenkins

  1. /**
  2. * Gets the directory where this build is being built.
  3. *
  4. * <p>
  5. * Note to implementors: to control where the workspace is created, override
  6. * {@link AbstractBuildExecution#decideWorkspace(Node,WorkspaceList)}.
  7. *
  8. * @return
  9. * null if the workspace is on an agent that's not connected. Note that once the build is completed,
  10. * the workspace may be used to build something else, so the value returned from this method may
  11. * no longer show a workspace as it was used for this build.
  12. * @since 1.319
  13. */
  14. public final @CheckForNull FilePath getWorkspace() {
  15. if (workspace==null) return null;
  16. Node n = getBuiltOn();
  17. if (n==null) return null;
  18. return n.createPath(workspace);
  19. }

代码示例来源:origin: org.jenkins-ci.main/jenkins-core

  1. private FilePath $(String file) {
  2. return node.createPath(file);
  3. }
  4. }

代码示例来源:origin: org.eclipse.hudson.main/hudson-core

  1. private FilePath $(String file) {
  2. return node.createPath(file);
  3. }
  4. }

代码示例来源:origin: org.jvnet.hudson.main/hudson-core

  1. private FilePath $(String file) {
  2. return node.createPath(file);
  3. }
  4. }

代码示例来源:origin: org.eclipse.hudson/hudson-core

  1. private FilePath $(String file) {
  2. return node.createPath(file);
  3. }
  4. }

代码示例来源:origin: hudson/hudson-2.x

  1. private FilePath $(String file) {
  2. return node.createPath(file);
  3. }
  4. }

代码示例来源:origin: org.jenkins-ci.plugins/python-wrapper

  1. public FilePath superCreatePath(String absolutePath) {
  2. return super.createPath(absolutePath);
  3. }

代码示例来源:origin: org.jvnet.hudson.main/hudson-core

  1. /**
  2. * Gets the directory where this build is being built.
  3. *
  4. * <p>
  5. * Note to implementors: to control where the workspace is created, override
  6. * {@link AbstractRunner#decideWorkspace(Node,WorkspaceList)}.
  7. *
  8. * @return
  9. * null if the workspace is on a slave that's not connected. Note that once the build is completed,
  10. * the workspace may be used to build something else, so the value returned from this method may
  11. * no longer show a workspace as it was used for this build.
  12. * @since 1.319
  13. */
  14. public final FilePath getWorkspace() {
  15. if (workspace==null) return null;
  16. Node n = getBuiltOn();
  17. if (n==null) return null;
  18. return n.createPath(workspace);
  19. }

代码示例来源:origin: org.jenkins-ci.main/jenkins-core

  1. /**
  2. * Gets the directory where this build is being built.
  3. *
  4. * <p>
  5. * Note to implementors: to control where the workspace is created, override
  6. * {@link AbstractBuildExecution#decideWorkspace(Node,WorkspaceList)}.
  7. *
  8. * @return
  9. * null if the workspace is on an agent that's not connected. Note that once the build is completed,
  10. * the workspace may be used to build something else, so the value returned from this method may
  11. * no longer show a workspace as it was used for this build.
  12. * @since 1.319
  13. */
  14. public final @CheckForNull FilePath getWorkspace() {
  15. if (workspace==null) return null;
  16. Node n = getBuiltOn();
  17. if (n==null) return null;
  18. return n.createPath(workspace);
  19. }

代码示例来源:origin: org.eclipse.hudson.main/hudson-core

  1. /**
  2. * Gets the directory where this build is being built.
  3. *
  4. * <p>
  5. * Note to implementors: to control where the workspace is created, override
  6. * {@link AbstractRunner#decideWorkspace(Node,WorkspaceList)}.
  7. *
  8. * @return
  9. * null if the workspace is on a slave that's not connected. Note that once the build is completed,
  10. * the workspace may be used to build something else, so the value returned from this method may
  11. * no longer show a workspace as it was used for this build.
  12. * @since 1.319
  13. */
  14. public final FilePath getWorkspace() {
  15. if (workspace==null) return null;
  16. Node n = getBuiltOn();
  17. if (n==null) return null;
  18. return n.createPath(workspace);
  19. }

代码示例来源:origin: hudson/hudson-2.x

  1. /**
  2. * Gets the directory where this build is being built.
  3. *
  4. * <p>
  5. * Note to implementors: to control where the workspace is created, override
  6. * {@link AbstractRunner#decideWorkspace(Node,WorkspaceList)}.
  7. *
  8. * @return
  9. * null if the workspace is on a slave that's not connected. Note that once the build is completed,
  10. * the workspace may be used to build something else, so the value returned from this method may
  11. * no longer show a workspace as it was used for this build.
  12. * @since 1.319
  13. */
  14. public final FilePath getWorkspace() {
  15. if (workspace==null) return null;
  16. Node n = getBuiltOn();
  17. if (n==null) return null;
  18. return n.createPath(workspace);
  19. }

代码示例来源:origin: org.eclipse.hudson/hudson-core

  1. /**
  2. * Gets the directory where this build is being built.
  3. *
  4. * <p> Note to implementors: to control where the workspace is created,
  5. * override {@link AbstractRunner#decideWorkspace(Node,WorkspaceList)}.
  6. *
  7. * @return null if the workspace is on a slave that's not connected. Note
  8. * that once the build is completed, the workspace may be used to build
  9. * something else, so the value returned from this method may no longer show
  10. * a workspace as it was used for this build.
  11. * @since 1.319
  12. */
  13. public final FilePath getWorkspace() {
  14. if (workspace == null) {
  15. return null;
  16. }
  17. Node n = getBuiltOn();
  18. if (n == null) {
  19. return null;
  20. }
  21. return n.createPath(workspace);
  22. }

代码示例来源:origin: jenkinsci/docker-workflow-plugin

  1. /**
  2. * Checks if this {@link DockerClient} instance is running inside a container and returns the id of the container
  3. * if so.
  4. *
  5. * @return an optional string containing the <strong>container id</strong>, or <strong>absent</strong> if
  6. * it isn't containerized.
  7. * @see <a href="http://stackoverflow.com/a/25729598/12916">Discussion</a>
  8. */
  9. public Optional<String> getContainerIdIfContainerized() throws IOException, InterruptedException {
  10. if (node == null) {
  11. return Optional.absent();
  12. }
  13. FilePath cgroupFile = node.createPath("/proc/self/cgroup");
  14. if (cgroupFile == null || !cgroupFile.exists()) {
  15. return Optional.absent();
  16. }
  17. return ControlGroup.getContainerId(cgroupFile);
  18. }

代码示例来源:origin: org.jenkins-ci.plugins/python-wrapper

  1. @Override
  2. public @CheckForNull
  3. FilePath createPath(String absolutePath) {
  4. initPython();
  5. if (pexec.isImplemented(9)) {
  6. return (FilePath) pexec.execPython("create_path", absolutePath);
  7. } else {
  8. return super.createPath(absolutePath);
  9. }
  10. }

代码示例来源:origin: org.jenkins-ci.plugins/docker-commons

  1. if (home != null) {
  2. if (node != null) {
  3. FilePath homeFP = node.createPath(home);
  4. if (homeFP != null) {
  5. return homeFP.child("bin/docker").getRemote();

代码示例来源:origin: jenkinsci/docker-commons-plugin

  1. if (home != null) {
  2. if (node != null) {
  3. FilePath homeFP = node.createPath(home);
  4. if (homeFP != null) {
  5. return homeFP.child("bin/docker").getRemote();

代码示例来源:origin: org.jenkins-ci.plugins/disk-usage

  1. String path = pathIterator.next();
  2. try{
  3. FilePath workspace = node.createPath(path);
  4. if(!workspace.exists()){
  5. pathIterator.remove();

代码示例来源:origin: jenkinsci/docker-build-publish-plugin

  1. context = builtOn.createPath(expandAll(getBuildContext()));
  2. } else {
  3. context = new FilePath(new File(expandAll(getBuildContext())));

相关文章