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

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

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

AbstractProject.getRootDir介绍

暂无

代码示例

代码示例来源:origin: com.marvelution.jira.plugins/jenkins-jira-plugin

private EntityLinkStore(AbstractProject project) {
  super(project.getRootDir());
}

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

/**
 * 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 AbstractProject<?, ?> project, final String pluginName) {
  return new File(project.getRootDir(), pluginName + ".txt");
}

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

/**
 * 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 File createDefaultsFile(final AbstractProject<?, ?> project, final String pluginName) {
  return new File(project.getRootDir(), pluginName + ".txt");
}

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

/**
 * Gets the file that stores the externals.
 */
private static File getExternalsFile(AbstractProject project) {
  return new File(project.getRootDir(), "svnexternals.txt");
}

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

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

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

/**
 * Gets the file that stores the externals.
 */
private static File getExternalsFile(AbstractProject project) {
  return new File(project.getRootDir(), "svnexternals.txt");
}

代码示例来源:origin: jenkinsci/analysis-core-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 File createDefaultsFile(final AbstractProject<?, ?> project, final String pluginName) {
  return new File(project.getRootDir(), pluginName + ".txt");
}

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

private XmlFile getXmlFile() {
  return new XmlFile(new File(project.getRootDir(),"subversion.credentials"));
}

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

public File getRootDir() {
  return new File(getOwner().getRootDir(),"promotions");
}

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

private XmlFile getXmlFile() {
  return new XmlFile(new File(project.getRootDir(), credentialsFileName));
}

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

/**
   * Checks if the series file is valid.
   */
  public FormValidation doCheckSeriesFile(
      @AncestorInPath AbstractProject<?, ?> project,
      @QueryParameter String value) throws IOException {
    // we don't have a workspace while in Pipeline editor
    if (project == null || project.getRootDir() == null) {
      return FormValidation.ok();
    }
    return FilePath.validateFileMask(project.getSomeWorkspace(), value);
  }
}

代码示例来源:origin: JoelJ/ez-templates

Util.deleteRecursive(new File(implementationProject.getRootDir(), "promotions"));
promotions.getItems().clear();
File templatePromotions = new File(templateProject.getRootDir(), "promotions");
String[] list = templatePromotions.list();
if (list != null) {

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

/**
 * Called by hudson at the end of a build.
 *
 * @param build
 *            the build
 * @param launcher
 *            the launcher
 * @param listener
 *            for reporting errors
 * @return true always.
 * @throws InterruptedException
 *             if user cancels the operation
 * @throws IOException
 *             if problem parsing the xml files
 */
@Override
public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener)
    throws InterruptedException, IOException {
  FilePath htmlPath = new FilePath(new File(build.getProject().getRootDir(), VIOLATIONS));
  FilePath targetPath = new FilePath(new File(build.getRootDir(), VIOLATIONS));
  FilePath workspace = build.getWorkspace();
  build.getActions().add(createBuildAction(workspace, targetPath, htmlPath, config, build, listener));
  return true;
}

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

/*package*/ void migratePerJobCredentials() {
  if (credentials == null && !mayHaveLegacyPerJobCredentials ) {
    // nothing to do here
    return;
  }
  boolean allOk = true;
  for (AbstractProject<?, ?> job : Jenkins.getInstance().getAllItems(AbstractProject.class)) {
    File jobCredentials = new File(job.getRootDir(), "subversion.credentials");
    if (jobCredentials.isFile()) {
      try {
        if (job.getScm() instanceof SubversionSCM) {
          new PerJobCredentialStore(job).migrateCredentials(this);
          job.save();
        } // else: job is not using Subversion anymore
        if (!jobCredentials.delete()) {
          LOGGER.log(Level.WARNING, "Could not remove legacy per-job credentials store file: {0}", jobCredentials);
          allOk = false;
        }
      } catch (IOException e) {
        LOGGER.log(Level.WARNING, "Could not migrate per-job credentials for " + job.getFullName(), e);
        allOk = false;
      }
    }
  }
  mayHaveLegacyPerJobCredentials = !allOk;
  save();
}

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

final File destDir = b.getProject().getRootDir();

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

final File destDir = b.getProject().getRootDir();

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

final File ivyF = new File(b.getProject().getRootDir(), BACKUP_IVY_FILE_NAME);
try {
  copyIvyFileFromWorkspaceIfNecessary(b.getWorkspace(), ivyF);

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

List<AbstractProject> projects = getAllProjects((ItemGroup) project);
  for(AbstractProject p: projects){
      exceededFiles.add(p.getRootDir());
long buildSize = DiskUsageUtil.getFileSize(project.getRootDir(), exceededFiles);
DiskUsageProperty property = (DiskUsageProperty) project.getProperty(DiskUsageProperty.class);
if(property==null){

代码示例来源:origin: JoelJ/ez-templates

project.onLoad(project.getParent(), project.getRootDir().getName());
Jenkins.getInstance().rebuildDependencyGraph();

代码示例来源:origin: org.jvnet.hudson.plugins/testng-plugin

new FilePath(build.getProject().getRootDir()),
new FilePath(build.getRootDir()),
build.getModuleRoot(),

相关文章

微信公众号

最新文章

更多

AbstractProject类方法