public void deploy() throws ServerRuntimeException {
    CloudGitApplication application = mySourceHandler.deploy();

    if (myLogManager != null) {
      LoggingHandler loggingHandler = myLogManager.getMainLoggingHandler();
      loggingHandler.print("Application is available at ");
      loggingHandler.printHyperlink(application.getWebUrl());
      loggingHandler.print("\n");
    }
  }
  public CloudGitDeploymentRuntime(
      CloudConfigurationBase serverConfiguration,
      A agent,
      ServerTaskExecutor taskExecutor,
      DeploymentTask<DC> task,
      AgentTaskExecutor agentTaskExecutor,
      @Nullable DeploymentLogManager logManager,
      CloudDeploymentNameProvider deploymentNameProvider,
      String remoteName,
      String cloudName,
      ServerType<?> serverType)
      throws ServerRuntimeException {
    myConfiguration = serverConfiguration;
    myTasksExecutor = taskExecutor;
    myLogManager = logManager;

    myRemoteName = remoteName;
    myCloudName = cloudName;

    List<CloudGitDeploymentSourceHandlerProvider> handlerProviders =
        CloudGitDeploymentConfiguratorBase.getDeploymentSourceHandlerProviders(serverType);
    DeploymentSource deploymentSource = task.getSource();
    for (CloudGitDeploymentSourceHandlerProvider handlerProvider : handlerProviders) {
      DeploymentSourceHandler sourceHandler = handlerProvider.createHandler(this, deploymentSource);
      if (sourceHandler != null) {
        mySourceHandler = sourceHandler;
        break;
      }
    }
    if (mySourceHandler == null) {
      throw new ServerRuntimeException("Unknown deployment source");
    }

    myContentRootFile = mySourceHandler.getRepositoryRootFile();

    VirtualFile contentRoot =
        LocalFileSystem.getInstance().refreshAndFindFileByIoFile(myContentRootFile);
    LOG.assertTrue(contentRoot != null, "Repository root is not found");
    myContentRoot = contentRoot;

    myProject = task.getProject();
    myGitRepositoryManager = GitUtil.getRepositoryManager(myProject);
    myGit = ServiceManager.getService(Git.class);
    if (myGit == null) {
      throw new ServerRuntimeException("Can't initialize GIT");
    }

    myAgentTaskExecutor = agentTaskExecutor;
    myLoggingHandler =
        logManager == null
            ? new CloudSilentLoggingHandlerImpl()
            : new CloudLoggingHandlerImpl(logManager);

    myPresentableName = deploymentSource.getPresentableName();

    DC deploymentConfiguration = task.getConfiguration();
    myApplicationName =
        deploymentConfiguration.isDefaultDeploymentName()
            ? deploymentNameProvider.getDeploymentName(deploymentSource)
            : deploymentConfiguration.getDeploymentName();

    myDeployment = agent.createDeployment(getApplicationName(), myLoggingHandler);
  }