当前位置: 首页>>代码示例>>Java>>正文


Java BuildFinishedStatus.FINISHED_FAILED属性代码示例

本文整理汇总了Java中jetbrains.buildServer.agent.BuildFinishedStatus.FINISHED_FAILED属性的典型用法代码示例。如果您正苦于以下问题:Java BuildFinishedStatus.FINISHED_FAILED属性的具体用法?Java BuildFinishedStatus.FINISHED_FAILED怎么用?Java BuildFinishedStatus.FINISHED_FAILED使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在jetbrains.buildServer.agent.BuildFinishedStatus的用法示例。


在下文中一共展示了BuildFinishedStatus.FINISHED_FAILED属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: logJobStatuses

private BuildFinishedStatus logJobStatuses(Collection<Job> jobs) {
    BuildFinishedStatus result = BuildFinishedStatus.FINISHED_SUCCESS;

    for (Job job : jobs) {
        String jobTitle = job.getTitle();
        String jobUrl = getJobUrl(job.getId());
        if (job.getStatus() == JobStatus.SUCCESS) {
            logger.message(format("%s job execution succeeded (%s).", jobTitle, jobUrl));
        } else if (job.getStatus() == JobStatus.FAILURE) {
            if (result != BuildFinishedStatus.FINISHED_FAILED) {
                result = BuildFinishedStatus.FINISHED_WITH_PROBLEMS;
            }
            logger.warning(format("%s job execution failed (%s).", jobTitle, jobUrl));
        } else {
            result = BuildFinishedStatus.FINISHED_FAILED;
            logger.error(
                    format("Unexpected error occured during execution of '%s' or execution took to long (%s).",
                            jobTitle, jobUrl));
        }
    }
    return result;
}
 
开发者ID:automate-website,项目名称:teamcity-plugin,代码行数:22,代码来源:AutomateWebsiteBuildProcess.java

示例2: runProcess

@Override
public BuildFinishedStatus runProcess() {
  JSch.setLogger(new JSchBuildLogger(myLogger));
  Session session = null;
  try {
    session = myProvider.getSession();
    return executeCommand(session, myPty, myCommands);
  } catch (JSchException e) {
    myLogger.error(e.toString());
    LOG.warnAndDebugDetails(e.getMessage(), e);
    return BuildFinishedStatus.FINISHED_FAILED;
  } finally {
    if (session != null) {
      session.disconnect();
    }
  }
}
 
开发者ID:JetBrains,项目名称:teamcity-deployer-plugin,代码行数:17,代码来源:SSHExecProcessAdapter.java

示例3: waitFor

@NotNull
@Override
public BuildFinishedStatus waitFor() throws RunBuildException {
    while (!isInterrupted && !isFinished) {
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            throw new RunBuildException(e);
        }
    }

    // MUDO BuildFinishedStatus.FINISHED_WITH_PROBLEMS ??

    return isFinished
            ? (isFailed ? BuildFinishedStatus.FINISHED_FAILED : BuildFinishedStatus.FINISHED_SUCCESS)
            : BuildFinishedStatus.INTERRUPTED;
}
 
开发者ID:rvdginste,项目名称:todo-teamcity-plugin,代码行数:17,代码来源:AbstractBuildProcessAdapter.java

示例4: waitFor

@Override
public @NotNull BuildFinishedStatus waitFor() throws RunBuildException {
    while (!isInterrupted() && !hasFinished) {
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            throw new RunBuildException(e);
        }
    }
    return hasFinished ?
            hasFailed ? BuildFinishedStatus.FINISHED_FAILED :
                    BuildFinishedStatus.FINISHED_SUCCESS :
            BuildFinishedStatus.INTERRUPTED;
}
 
开发者ID:gonzadocarmo,项目名称:teamcity-s3-plugin,代码行数:14,代码来源:AWSS3BuildProcessAdapter.java

示例5: makeReport

private void makeReport(List<QueuedBuild> queuedBuilds) {
    List<com.presidentio.teamcity.matrix.build.common.dto.Build> builds = new ArrayList<>(queuedBuilds.size());
    for (QueuedBuild queuedBuild : queuedBuilds) {
        builds.add(queuedBuild.getBuild());
    }

    try {
        report = new Report(builds, configuration.getParameters());
        saveReport(report);
    } catch (IOException e) {
        buildRunnerContext.getBuild().getBuildLogger().error("Failed to save report");
        buildRunnerContext.getBuild().getBuildLogger().exception(e);
        buildFinishedStatus = BuildFinishedStatus.FINISHED_FAILED;
    }
}
 
开发者ID:presidentio,项目名称:teamcity-matrix-build-plugin,代码行数:15,代码来源:MatrixBuildProcess.java


注:本文中的jetbrains.buildServer.agent.BuildFinishedStatus.FINISHED_FAILED属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。