hudson.model.AbstractBuild.getRootDir()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(6.0k)|赞(0)|评价(0)|浏览(141)

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

AbstractBuild.getRootDir介绍

暂无

代码示例

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

private File getFileParameterFolderUnderBuild(AbstractBuild<?, ?> build){
  return new File(build.getRootDir(), FOLDER_NAME);
}

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

/**
 * Returns true if the changelog is already computed.
 */
public boolean hasChangeSetComputed() {
  File changelogFile = new File(getRootDir(), "changelog.xml");
  return changelogFile.exists();
}

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

/**
 * Creates a tar ball.
 */
public WorkspaceSnapshot snapshot(AbstractBuild<?, ?> build, FilePath ws, String glob, TaskListener listener) throws IOException, InterruptedException {
  File wss = new File(build.getRootDir(),"workspace.tgz");
  try (OutputStream os = new BufferedOutputStream(Files.newOutputStream(wss.toPath()))) {
    ws.archive(ArchiverFactory.TARGZ, os, glob);
  } catch (InvalidPathException e) {
    throw new IOException(e);
  }
  return new WorkspaceSnapshotImpl();
}

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

public void restoreTo(AbstractBuild<?,?> owner, FilePath dst, TaskListener listener) throws IOException, InterruptedException {
    File zip = new File(owner.getRootDir(),"workspace.zip");
    if (zip.exists()) {// we used to keep it in zip
      new FilePath(zip).unzip(dst);
    } else {// but since 1.456 we do tgz
      File tgz = new File(owner.getRootDir(),"workspace.tgz");
      new FilePath(tgz).untar(dst, TarCompression.GZIP);
    }
  }
}

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

private ChangeLogSet<? extends Entry> calcChangeSet() {
  File changelogFile = new File(getRootDir(), "changelog.xml");
  if (!changelogFile.exists())
    return ChangeLogSet.createEmpty(this);
  try {
    return scm.parse(this,changelogFile);
  } catch (IOException e) {
    LOGGER.log(WARNING, "Failed to parse "+changelogFile,e);
  } catch (SAXException e) {
    LOGGER.log(WARNING, "Failed to parse "+changelogFile,e);
  }
  return ChangeLogSet.createEmpty(this);
}

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

/**
 * Get the location under the build directory to store the file parameter.
 *
 * @param build the build
 * @return the location to store the file parameter
 */
private File getLocationUnderBuild(AbstractBuild build) {
  return new File(build.getRootDir(), "fileParameters/" + location);
}

代码示例来源:origin: org.jvnet.hudson.plugins/cvs

/**
 * Returns the file name used to archive the build.
 */
static File getArchiveFile(AbstractBuild build) {
  return new File(build.getRootDir(), "workspace.zip");
}

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

/**
 * Get the location under the build directory to store the file parameter.
 *
 * @param build the build
 * @return the location to store the file parameter
 */
private File getLocationUnderBuild(AbstractBuild build) {
  return new File(build.getRootDir(), "fileParameters/" + location);
}

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

/**
 * Polling log that triggered the build.
 */
public File getPollingLogFile() {
  return new File(build.getRootDir(),"polling.log");
}

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

/**
 * Get the location under the build directory to store the file parameter.
 *
 * @param build the build
 * @return the location to store the file parameter
 */
private File getLocationUnderBuild(AbstractBuild build) {
  return new File(build.getRootDir(), "fileParameters/" + location);
}

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

/**
 * Polling log that triggered the build.
 */
public File getPollingLogFile() {
  return new File(build.getRootDir(),"polling.log");
}

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

/**
 * Get the location under the build directory to store the file parameter.
 *
 * @param build the build
 * @return the location to store the file parameter
 */
private File getLocationUnderBuild(AbstractBuild build) {
  return new File(build.getRootDir(), "fileParameters/" + location);
}

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

/**
 * Polling log that triggered the build.
 */
public File getPollingLogFile() {
  return new File(build.getRootDir(),"polling.log");
}

代码示例来源:origin: org.hudsonci.plugins/subversion

/**
 * Gets the file that stores the revision.
 */
public static File getRevisionFile(AbstractBuild build) {
  return new File(build.getRootDir(), "revision.txt");
}

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

/**
 * Returns true if the changelog is already computed.
 */
public boolean hasChangeSetComputed() {
  File changelogFile = new File(getRootDir(), "changelog.xml");
  return changelogFile.exists();
}

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

/**
 * Returns true if the changelog is already computed.
 */
public boolean hasChangeSetComputed() {
  File changelogFile = new File(getRootDir(), "changelog.xml");
  return changelogFile.exists();
}

代码示例来源:origin: org.hudsonci.plugins/analysis-core

/** {@inheritDoc} */
public String getTempName(final AbstractBuild<?, ?> owner) {
  if (fileName != null) {
    return owner.getRootDir().getAbsolutePath()
        + SLASH + WORKSPACE_FILES
        + SLASH + Integer.toHexString(fileName.hashCode()) + ".tmp";
  }
  return StringUtils.EMPTY;
}

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

/**
 * Creates a tar ball.
 */
public WorkspaceSnapshot snapshot(AbstractBuild<?, ?> build, FilePath ws, String glob, TaskListener listener) throws IOException, InterruptedException {
  File wss = new File(build.getRootDir(),"workspace.tgz");
  try (OutputStream os = new BufferedOutputStream(Files.newOutputStream(wss.toPath()))) {
    ws.archive(ArchiverFactory.TARGZ, os, glob);
  } catch (InvalidPathException e) {
    throw new IOException(e);
  }
  return new WorkspaceSnapshotImpl();
}

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

public void restoreTo(AbstractBuild<?,?> owner, FilePath dst, TaskListener listener) throws IOException, InterruptedException {
    File zip = new File(owner.getRootDir(),"workspace.zip");
    if (zip.exists()) {// we used to keep it in zip
      new FilePath(zip).unzip(dst);
    } else {// but since 1.456 we do tgz
      File tgz = new File(owner.getRootDir(),"workspace.tgz");
      new FilePath(tgz).untar(dst, TarCompression.GZIP);
    }
  }
}

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

public void restoreTo(AbstractBuild<?,?> owner, FilePath dst, TaskListener listener) throws IOException, InterruptedException {
    File wss = new File(owner.getRootDir(),"workspace.zip");
    new FilePath(wss).unzip(dst);
  }
}

相关文章

微信公众号

最新文章

更多

AbstractBuild类方法