private Void retrieveRepositoryManagerResults(BuildExecutionSession buildExecutionSession) {
    try {
      buildExecutionSession.setStatus(
          BuildExecutionStatus.COLLECTING_RESULTS_FROM_REPOSITORY_NAMAGER);
      RunningEnvironment runningEnvironment = buildExecutionSession.getRunningEnvironment();
      buildExecutionSession.setRunningEnvironment(runningEnvironment);

      RepositorySession repositorySession = runningEnvironment.getRepositorySession();
      RepositoryManagerResult repositoryManagerResult = repositorySession.extractBuildArtifacts();
      buildExecutionSession.setRepositoryManagerResult(repositoryManagerResult);
    } catch (Throwable e) {
      throw new BuildProcessException(e, buildExecutionSession.getRunningEnvironment());
    }
    return null;
  }
 private Void destroyEnvironment(BuildExecutionSession buildExecutionSession) {
   try {
     buildExecutionSession.setStatus(BuildExecutionStatus.BUILD_ENV_DESTROYING);
     buildExecutionSession.getRunningEnvironment().destroyEnvironment();
     buildExecutionSession.setStatus(BuildExecutionStatus.BUILD_ENV_DESTROYED);
   } catch (Throwable e) {
     throw new BuildProcessException(e);
   }
   return null;
 }
 private RunningBuild buildSetUp(BuildExecutionSession buildExecutionSession) {
   buildExecutionSession.setStatus(BuildExecutionStatus.BUILD_SETTING_UP);
   RunningEnvironment runningEnvironment = buildExecutionSession.getRunningEnvironment();
   try {
     String liveLogWebSocketUrl = runningEnvironment.getBuildAgentUrl();
     log.debug("Setting live log websocket url: {}", liveLogWebSocketUrl);
     buildExecutionSession.setLiveLogsUri(Optional.of(new URI(liveLogWebSocketUrl)));
     buildExecutionSession.setStartTime(new Date());
     BuildDriver buildDriver =
         buildDriverFactory.getBuildDriver(
             buildExecutionSession.getBuildExecutionConfiguration().getBuildType());
     return buildDriver.startProjectBuild(buildExecutionSession, runningEnvironment);
   } catch (Throwable e) {
     throw new BuildProcessException(e, runningEnvironment);
   }
 }