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

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

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

AbstractBuild.getLogFile介绍

暂无

代码示例

代码示例来源:origin: org.jvnet.hudson.plugins/groovy-postbuild

public boolean logContains(String regexp) {
  return contains(build.getLogFile(), regexp);
}

代码示例来源:origin: org.jvnet.hudson.plugins/groovy-postbuild

public Matcher getLogMatcher(String regexp) {
  return getMatcher(build.getLogFile(), regexp);
}

代码示例来源:origin: org.hudsonci.plugins/rest-plugin-api

@GET
  @Path("console/content")
  @Produces({ TEXT_PLAIN })
  public InputStream getConsoleContent(final @PathParam("projectName") String projectName,
                     final @PathParam("buildNumber") int buildNumber,
                     final @QueryParam("offset") long offset,
                     final @QueryParam("length") long length)
    throws IOException
  {
    log.debug("Get console content: {} #{} ({}:{})", $(projectName, buildNumber, offset, length));

    //
    // FIXME: This may include serialized annotation crap, need to resolve...
    //

    AbstractBuild build = support.getBuild(projectName, buildNumber);
    File file = build.getLogFile();

    return new OffsetLimitInputStream(new FileInputStream(file), offset, length);
  }
}

代码示例来源:origin: org.hudsonci.plugins/rest-plugin-api

@GET
@Path("console")
public ConsoleDTO getConsole(final @PathParam("projectName") String projectName, final @PathParam("buildNumber") int buildNumber) throws IOException {
  log.debug("Get console: {} #{}", projectName, buildNumber);
  AbstractBuild build = support.getBuild(projectName, buildNumber);
  File file = build.getLogFile();
  ConsoleDTO target = new ConsoleDTO();
  target.setExists(file.exists());
  if (file.exists()) {
    target.setLength(file.length());
    target.setLastModified(file.lastModified());
  }
  return target;
}

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

/**
 * Upload the build log to the collabnet server.
 *
 * @param build the current Jenkins build.
 * @return the id associated with the file upload.
 */
private CTFFile uploadBuildLog(AbstractBuild <?, ?> build) {
  if (this.cna == null) {
    this.log("Cannot call updateSucceedingBuild, not logged in!");
    return null;
  }
  try {
    return cna.upload(build.getLogFile());
  } catch (RemoteException re) {
    this.log("uploadBuildLog", re);
  }
  return null;
}

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

/**
 * Upload the build log to the collabnet server.
 *
 * @param build the current Jenkins build.
 * @return the id associated with the file upload.
 */
private CTFFile uploadBuildLog(AbstractBuild <?, ?> build) {
  if (this.cna == null) {
    this.logConsole("Cannot call updateSucceedingBuild, not logged in!");
    return null;
  }
  try {
    return cna.upload(build.getLogFile());
  } catch (RemoteException re) {
    this.log("uploadBuildLog", re);
    return null;
  }
}

代码示例来源:origin: org.jvnet.hudson.plugins/description-setter

&& build.getResult().isWorseThan(Result.UNSTABLE);
matcher = parseLog(build.getLogFile(),
    useUnstable ? regexpForFailed : regexp);
if (matcher != null) {

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

CTFFile file = this.uploadBuildLog(build);
if (file == null) {
  this.logConsole("Failed to upload " + build.getLogFile().getName() + ".");
} else {
  try {
    CTFDocument docId = this.updateOrCreateDoc(folder, file,
                    build.getLogFile().getName(),
                    CNDocumentUploader.
                    getMimeType(build.
                          getLogFile()),
                    build);
    this.logConsole("Uploaded " + build.getLogFile().getName() + " -> " + docId.getURL());
    numUploaded++;
  } catch (RemoteException re) {

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

String title = this.getInterpreted(build, this.getTitle());
try {
  issue.update(comment, build.getLogFile().getName(), "text/plain", buildLog);
  this.log("Updated tracker artifact '" + title + "' in tracker '" 
       + this.getTracker() + "' in project '" + this.getProject()

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

private List<ParserResult> parseConsoleLog(final AbstractBuild<?, ?> build,
    final PluginLogger logger) throws IOException, InterruptedException {
  List<ParserResult> results = Lists.newArrayList();
  for (ConsoleParser parser : getConsoleParsers()) {
    String parserName = parser.getParserName();
    logger.log("Parsing warnings in console log with parser " + parserName);
    Collection<FileAnnotation> warnings = new ParserRegistry(
        ParserRegistry.getParsers(parserName),
        getDefaultEncoding(), getIncludePattern(), getExcludePattern()).parse(build
        .getLogFile());
    if (!build.getWorkspace().isRemote()) {
      guessModuleNames(build, warnings);
    }
    ParserResult project;
    if (canResolveRelativePaths()) {
      project = new ParserResult(build.getWorkspace());
    }
    else {
      project = new ParserResult();
    }
    project.addAnnotations(warnings);
    results.add(annotate(build, project, parserName));
  }
  return results;
}

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

String title = this.getInterpreted(build, this.getTitle());
try {
  issue.update(comment, build.getLogFile().getName(), "text/plain", buildLog);
  this.log(update + " tracker artifact '" + title + "' in tracker '" 
       + this.getTracker() + "' in project '" + this.getProject()

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

File logFile = build.getLogFile();

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

String title = this.getInterpreted(build, this.getTitle());
try {
  issue.update(comment, build.getLogFile().getName(), "text/plain", buildLog);
  this.log("Closed tracker artifact '" + title + "' in tracker '" 
       + this.getTracker() + "' in project '" + this.getProject()

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

null, this.priority, 0, 
                 assignTo, release!=null?release.getId():null, null,
                 build.getLogFile().getName(), 
                 "text/plain", buildLog);
this.log("Created tracker artifact '" + title + "' in tracker '"

相关文章

微信公众号

最新文章

更多

AbstractBuild类方法