本文整理汇总了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;
}
示例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();
}
}
}
示例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;
}
示例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;
}
示例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;
}
}