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


Java BuildFinishedStatus.FINISHED_SUCCESS属性代码示例

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


在下文中一共展示了BuildFinishedStatus.FINISHED_SUCCESS属性的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
 
开发者ID:presidentio,项目名称:teamcity-matrix-build-plugin,代码行数:19,代码来源:QueuedBuild.java

示例2: 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

示例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: 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;
}
 
开发者ID:jonnyzzz,项目名称:TeamCity.Virtual,代码行数:17,代码来源:CompositeBuildProcessImpl.java

示例5: test_interrupted_in_process_start

@Test
public void test_interrupted_in_process_start() {
  final AtomicReference<BuildProcess> bp = new AtomicReference<BuildProcess>();
  DelegatingBuildProcess aaa = new DelegatingBuildProcess(new LoggingActionBase(){
    @Override
    protected RecordingBuildProcess createSub() {
      return new RecordingBuildProcess("i", BuildFinishedStatus.FINISHED_SUCCESS){
        @Override
        public void start() throws RunBuildException {
          super.start();
          bp.get().interrupt();
        }
      };
    }
  });
  bp.set(aaa);

  assertRunSuccessfully(aaa, INTERRUPTED);
  assertLog("start-impl","start-i","interrupt-i","waitFor-i","finish-impl");
  Assert.assertTrue(aaa.isFinished());
  Assert.assertTrue(aaa.isInterrupted());
}
 
开发者ID:jonnyzzz,项目名称:TeamCity.Virtual,代码行数:22,代码来源:DelegatingBuildProcessTest.java

示例6: test_interrupted_in_process_finish

@Test
public void test_interrupted_in_process_finish() {
  final AtomicReference<BuildProcess> bp = new AtomicReference<BuildProcess>();
  DelegatingBuildProcess aaa = new DelegatingBuildProcess(new LoggingActionBase(){
    @Override
    protected RecordingBuildProcess createSub() {
      return new RecordingBuildProcess("i", BuildFinishedStatus.FINISHED_SUCCESS){
        @NotNull
        @Override
        public BuildFinishedStatus waitFor() throws RunBuildException {
          bp.get().interrupt();
          return super.waitFor();
        }
      };
    }
  });
  bp.set(aaa);

  assertRunSuccessfully(aaa, INTERRUPTED);
  assertLog("start-impl","start-i","interrupt-i","waitFor-i","finish-impl");
  Assert.assertTrue(aaa.isFinished());
  Assert.assertTrue(aaa.isInterrupted());
}
 
开发者ID:jonnyzzz,项目名称:TeamCity.Virtual,代码行数:23,代码来源:DelegatingBuildProcessTest.java

示例7: test_interrupted_in_process_finishImpl

@Test
public void test_interrupted_in_process_finishImpl() {
  final AtomicReference<BuildProcess> bp = new AtomicReference<BuildProcess>();
  DelegatingBuildProcess aaa = new DelegatingBuildProcess(new LoggingAction(BuildFinishedStatus.FINISHED_SUCCESS){
    @Override
    public void finishedImpl() {
      bp.get().interrupt();
      super.finishedImpl();
    }
  });
  bp.set(aaa);

  assertRunSuccessfully(aaa, INTERRUPTED);
  assertLog("start-impl","start-i","waitFor-i","finish-impl");
  Assert.assertTrue(aaa.isFinished());
  Assert.assertTrue(aaa.isInterrupted());
}
 
开发者ID:jonnyzzz,项目名称:TeamCity.Virtual,代码行数:17,代码来源:DelegatingBuildProcessTest.java

示例8: 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

示例9: sessionFinished

@Nullable
@Override
public BuildFinishedStatus sessionFinished()
{
  myLogger.debug("SESSION FINISH");
  return BuildFinishedStatus.FINISHED_SUCCESS;
}
 
开发者ID:leo-from-spb,项目名称:teamcity-soft-installer,代码行数:7,代码来源:SoftInstallSession.java

示例10: start

@Override
public void start() throws RunBuildException {
    List<String> scenarioIds = config.getScenarioIds();
    Authentication principal = Authentication.of(config.getUsername(), config.getPassword());

    if (scenarioIds == null || scenarioIds.isEmpty()) {
        logger.message("Skipping execution - no scenarios were selected.");
        status = BuildFinishedStatus.FINISHED_SUCCESS;
        return;
    }
    logger.message(format("Creating jobs for selected scenarios %s ...",
            scenarioIds));
    List<Job> createdJobs = jobManagementRemoteService.createJobs(
            createJobs(config.getContext(), scenarioIds), principal);
    long jobsCreatedMillis = System.currentTimeMillis();

    Collection<String> createdJobIds = asJobIds(createdJobs);
    List<Job> updatedJobs;

    do {
        if (System.currentTimeMillis() - jobsCreatedMillis >= config.getExecutionTimeoutSec() * 1000) {
            break;
        }
        try {
            Thread.sleep(config.getJobStatusCheckIntervalSec() * 1000);
        } catch (InterruptedException e) {
            throw new ExecutionInterruptionException(
                    "Unexpected plugin execution thread interrupt occured.",
                    e);
        }

        logger.message("Checking job statuses ...");
        updatedJobs = jobManagementRemoteService.getJobsByIdsAndPrincipal(
                createdJobIds, principal, JobProfile.BRIEF);

    } while (!areCompleted(updatedJobs));

    logger.message("Jobs execution completed.");
    updatedJobs = jobManagementRemoteService.getJobsByIdsAndPrincipal(
            createdJobIds, principal, JobProfile.COMPLETE);

    status = logJobStatuses(updatedJobs);
}
 
开发者ID:automate-website,项目名称:teamcity-plugin,代码行数:43,代码来源:AutomateWebsiteBuildProcess.java

示例11: waitForImpl

@NotNull
@Override
protected BuildFinishedStatus waitForImpl() throws RunBuildException {
  return BuildFinishedStatus.FINISHED_SUCCESS;
}
 
开发者ID:jonnyzzz,项目名称:TeamCity.Virtual,代码行数:5,代码来源:DockerVM.java


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