hudson.model.Run.removeRunFromParent()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(3.5k)|赞(0)|评价(0)|浏览(84)

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

Run.removeRunFromParent介绍

暂无

代码示例

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

LOGGER.log(FINE, "{0}: {1} successfully deleted", new Object[] {this, rootDir});
removeRunFromParent();

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

/**
 * Deletes this build and its entire log
 *
 * @throws IOException
 *      if we fail to delete.
 */
public synchronized void delete() throws IOException {
  RunListener.fireDeleted(this);
  // if we have a symlink, delete it, too
  File link = new File(project.getBuildDir(), String.valueOf(getNumber()));
  link.delete();
  File rootDir = getRootDir();
  File tmp = new File(rootDir.getParentFile(),'.'+rootDir.getName());
  
  boolean renamingSucceeded = rootDir.renameTo(tmp);
  Util.deleteRecursive(tmp);
  // some user reported that they see some left-over .xyz files in the workspace,
  // so just to make sure we've really deleted it, schedule the deletion on VM exit, too.
  if(tmp.exists())
    tmp.deleteOnExit();
  if(!renamingSucceeded)
    throw new IOException(rootDir+" is in use");
  removeRunFromParent();
}

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

/**
 * Deletes this build and its entire log
 *
 * @throws IOException if we fail to delete.
 */
public synchronized void delete() throws IOException {
  RunListener.fireDeleted(this);
  // if we have a symlink, delete it, too
  File link = new File(project.getBuildDir(), String.valueOf(getNumber()));
  link.delete();
  File rootDir = getRootDir();
  File tmp = new File(rootDir.getParentFile(), '.' + rootDir.getName());
  boolean renamingSucceeded = rootDir.renameTo(tmp);
  Util.deleteRecursive(tmp);
  // some user reported that they see some left-over .xyz files in the workspace,
  // so just to make sure we've really deleted it, schedule the deletion on VM exit, too.
  if (tmp.exists()) {
    tmp.deleteOnExit();
  }
  if (!renamingSucceeded) {
    throw new IOException(rootDir + " is in use");
  }
  removeRunFromParent();
}

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

/**
 * Deletes this build and its entire log
 *
 * @throws IOException
 *      if we fail to delete.
 */
public synchronized void delete() throws IOException {
  RunListener.fireDeleted(this);
  // if we have a symlink, delete it, too
  File link = new File(project.getBuildDir(), String.valueOf(getNumber()));
  link.delete();
  File rootDir = getRootDir();
  File tmp = new File(rootDir.getParentFile(),'.'+rootDir.getName());
  
  boolean renamingSucceeded = rootDir.renameTo(tmp);
  Util.deleteRecursive(tmp);
  // some user reported that they see some left-over .xyz files in the workspace,
  // so just to make sure we've really deleted it, schedule the deletion on VM exit, too.
  if(tmp.exists())
    tmp.deleteOnExit();
  if(!renamingSucceeded)
    throw new IOException(rootDir+" is in use");
  removeRunFromParent();
}

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

/**
 * Deletes this build and its entire log
 *
 * @throws IOException
 *      if we fail to delete.
 */
public synchronized void delete() throws IOException {
  RunListener.fireDeleted(this);
  // if we have a symlink, delete it, too
  File link = new File(project.getBuildDir(), String.valueOf(getNumber()));
  link.delete();
  File rootDir = getRootDir();
  File tmp = new File(rootDir.getParentFile(),'.'+rootDir.getName());
  
  boolean renamingSucceeded = rootDir.renameTo(tmp);
  Util.deleteRecursive(tmp);
  // some user reported that they see some left-over .xyz files in the workspace,
  // so just to make sure we've really deleted it, schedule the deletion on VM exit, too.
  if(tmp.exists())
    tmp.deleteOnExit();
  if(!renamingSucceeded)
    throw new IOException(rootDir+" is in use");
  removeRunFromParent();
}

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

LOGGER.log(FINE, "{0}: {1} successfully deleted", new Object[] {this, rootDir});
removeRunFromParent();

相关文章

微信公众号

最新文章

更多

Run类方法