本文整理汇总了Java中jetbrains.buildServer.agent.BuildFinishedStatus.INTERRUPTED属性的典型用法代码示例。如果您正苦于以下问题:Java BuildFinishedStatus.INTERRUPTED属性的具体用法?Java BuildFinishedStatus.INTERRUPTED怎么用?Java BuildFinishedStatus.INTERRUPTED使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类jetbrains.buildServer.agent.BuildFinishedStatus
的用法示例。
在下文中一共展示了BuildFinishedStatus.INTERRUPTED属性的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: waitBuildFinish
public BuildFinishedStatus waitBuildFinish()
throws InterruptedException {
boolean buildFinished = false;
Build childBuild = null;
while (!buildFinished && !canceled) {
childBuild = buildsResource.serveBuild(build.getBuildId().toString(), "");
buildFinished = isBuildFinished(childBuild);
Thread.sleep(100L);
}
buildProgressLogger.message("Build " + build.getBuildId()
+ " is finished with success");
if (!canceled) {
if (childBuild.getStatus().equalsIgnoreCase(BuildStatusConst.ERROR)
|| childBuild.getStatus().equalsIgnoreCase(BuildStatusConst.FAILURE)) {
return BuildFinishedStatus.FINISHED_WITH_PROBLEMS;
}
}
return canceled ? BuildFinishedStatus.INTERRUPTED : BuildFinishedStatus.FINISHED_SUCCESS;
}
示例2: 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;
}
示例3: waitForImpl
@NotNull
protected BuildFinishedStatus waitForImpl() throws RunBuildException {
if (isInterrupted()) return BuildFinishedStatus.INTERRUPTED;
for (BuildProcess proc = myProcessList.poll(); proc != null; proc = myProcessList.poll()) {
myCurrentProcess.set(proc);
try {
proc.start();
final BuildFinishedStatus status = proc.waitFor();
if (status != BuildFinishedStatus.INTERRUPTED && status != BuildFinishedStatus.FINISHED_SUCCESS) return status;
} finally {
myCurrentProcess.set(null);
}
if (isInterrupted()) return BuildFinishedStatus.INTERRUPTED;
}
if (isInterrupted()) return BuildFinishedStatus.INTERRUPTED;
return BuildFinishedStatus.FINISHED_SUCCESS;
}
示例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: waitFor
@NotNull
@Override
public BuildFinishedStatus waitFor() throws RunBuildException {
try {
processThread.join();
return buildFinishedStatus;
} catch (InterruptedException e) {
buildRunnerContext.getBuild().getBuildLogger().error("Failed on waiting process finished");
buildRunnerContext.getBuild().getBuildLogger().exception(e);
return BuildFinishedStatus.INTERRUPTED;
}
}
示例6: waitFor
@NotNull
@Override
public BuildFinishedStatus waitFor() throws RunBuildException {
while (!isInterrupted() && !hasFinished) {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
throw new RunBuildException(e);
}
}
return hasFinished ? statusCode : BuildFinishedStatus.INTERRUPTED;
}
示例7: waitFor
@NotNull
@Override
public BuildFinishedStatus waitFor() throws RunBuildException {
try {
processThread.join();
afterProcessSuccessfullyFinished();
return buildFinishedStatus;
} catch (InterruptedException e) {
buildRunnerContext.getBuild().getBuildLogger().exception(e);
LOGGER.error("Failed on waiting process finished", e);
return BuildFinishedStatus.INTERRUPTED;
}
}
示例8: waitFor
@NotNull
public final BuildFinishedStatus waitFor() throws RunBuildException {
try {
if (isInterrupted()) return BuildFinishedStatus.INTERRUPTED;
BuildFinishedStatus status = waitForImpl();
if (isInterrupted()) return BuildFinishedStatus.INTERRUPTED;
return status;
} finally {
myIsFinished.set(true);
}
}
示例9: waitForImpl
@NotNull
@Override
protected final BuildFinishedStatus waitForImpl() throws RunBuildException {
try {
final BuildProcess process = myAction.startImpl();
myReference.set(process);
if (isInterrupted()) return BuildFinishedStatus.INTERRUPTED;
process.start();
return process.waitFor();
} finally {
myReference.set(null);
myAction.finishedImpl();
}
}