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

x33g5p2x  于2022-01-21 转载在 其他  
字(5.4k)|赞(0)|评价(0)|浏览(110)

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

Job.getRootDir介绍

暂无

代码示例

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

/*package*/ TextFile getNextBuildNumberFile() {
  return new TextFile(new File(this.getRootDir(), "nextBuildNumber"));
}

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

/**
 * Directory for storing {@link Run} records.
 * <p>
 * Some {@link Job}s may not have backing data store for {@link Run}s, but
 * those {@link Job}s that use file system for storing data should use this
 * directory for consistency.
 * 
 * @see RunMap
 */
public File getBuildDir() {
  // we use the null check variant so that people can write true unit tests with a mock ItemParent
  // and without a JenkinsRule. Such tests are of limited utility as there is a high risk of hitting
  // some code that needs the singleton, but for persistence migration test cases it makes sense to permit
  Jenkins j = Jenkins.getInstanceOrNull();
  if (j == null) {
    return new File(getRootDir(), "builds");
  }
  return j.getBuildDirFor(this);
}

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

/**
 * Backward compatibility.
 *
 * We used to have $JENKINS_HOME/jobs/JOBNAME/lastStable and lastSuccessful symlinked to the appropriate
 * builds, but now those are done in {@link PeepholePermalink}. So here, we simply create symlinks that
 * resolves to the symlink created by {@link PeepholePermalink}.
 */
private void createSymlink(@Nonnull TaskListener listener, @Nonnull String name, @Nonnull PermalinkProjectAction.Permalink target) throws InterruptedException {
  File buildDir = getParent().getBuildDir();
  File rootDir = getParent().getRootDir();
  String targetDir;
  if (buildDir.equals(new File(rootDir, "builds"))) {
    targetDir = "builds" + File.separator + target.getId();
  } else {
    targetDir = buildDir + File.separator + target.getId();
  }
  Util.createSymlink(rootDir, targetDir, name, listener);
}

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

public File superGetRootDir() {
  return super.getRootDir();
}

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

/**
 * Gets the directory where the Javadoc is stored for the given project.
 */
private static File getJavadocDir(Job<?,?> project) {
  return new File(project.getRootDir(),"javadoc");
}

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

/**
 * Creates a file with for the default values.
 *
 * @param project    the project used as directory for the file
 * @param pluginName the name of the plug-in
 * @return the created file
 */
protected static File createDefaultsFile(final Job<?, ?> project,
                     final String pluginName) {
  return new File(project.getRootDir(), pluginName + ".txt");
}

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

/**
 * Returns the file that records the last/current polling activity.
 */
public File getLogFile() {
  return new File(job.getRootDir(),"bitbucket-polling.log");
}

代码示例来源:origin: jenkinsci/analysis-core-plugin

/**
 * Creates a file with for the default values.
 *
 * @param job
 *            the job used as directory for the file
 * @param pluginName
 *            the name of the plug-in
 * @return the created file
 */
protected static File createDefaultsFile(final Job<?, ?> job, final String pluginName) {
  return new File(job.getRootDir(), pluginName + ".txt");
}

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

/**
 * Returns the file that records the last/current polling activity.
 */
public File getLogFile() {
  return new File(job.getRootDir(), "github-polling.log");
}

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

/**
 * Gets the file that stores the externals.
 */
@Nonnull
private static File getExternalsFile(Job project) {
  return new File(project.getRootDir(), SVN_EXTERNALS_FILE);
}

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

public File getLogFile() {
  return new File(job.getRootDir(), "team-polling.log");
}

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

/**
 * Check if "bitbucket-polling.log" already exists to initialize it
 */
public boolean IsLogFileInitialized() {
  File file = new File(job.getRootDir(),"bitbucket-polling.log");
  return file.exists();
}

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

public String getCsvFileName() {
  if (StringUtils.isBlank(csvFileName) && project != null) {
    try {
      csvFileName = File.createTempFile("plot-", ".csv", project.getRootDir()).getName();
    } catch (IOException e) {
      LOGGER.log(Level.SEVERE, "Unable to create temporary CSV file.", e);
    }
  }
  return csvFileName;
}

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

/*package*/ TextFile getNextBuildNumberFile() {
  return new TextFile(new File(this.getRootDir(), "nextBuildNumber"));
}

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

/*package*/ TextFile getNextBuildNumberFile() {
  return new TextFile(new File(this.getRootDir(), "nextBuildNumber"));
}

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

/*package*/ TextFile getNextBuildNumberFile() {
  return new TextFile(new File(this.getRootDir(), "nextBuildNumber"));
}

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

/*package*/ TextFile getNextBuildNumberFile() {
  return new TextFile(new File(this.getRootDir(), "nextBuildNumber"));
}

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

public XmlFile getConfigFile(){
  return new XmlFile(new File(job.getRootDir(), "disk-usage.xml"));
}

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

/**
 * gets the file corresponding to the source file.
 *
 * @return The file where the source file should be (if it exists)
 */
private File getSourceFile() {
  if (hasPermission()) {
    return new File(owner.getParent().getRootDir(), "cobertura/" + relativeSourcePath);
  }
  return null;
}

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

@Override
public File getRootDir() {
  initPython();
  if (pexec.isImplemented(81)) {
    return (File) pexec.execPython("get_root_dir");
  } else {
    return super.getRootDir();
  }
}

相关文章

微信公众号

最新文章

更多

Job类方法