public Date checkDeploymentStatus()

in aws-codedeploy-common/src/main/java/jetbrains/buildServer/runner/codedeploy/AWSClient.java [137:152]


  public Date checkDeploymentStatus(@NotNull String deploymentId, @Nullable Date knownDeploymentStartTime) {
    final DeploymentInfo dInfo = myCodeDeployClient.getDeployment(new GetDeploymentRequest().withDeploymentId(deploymentId)).getDeploymentInfo();

    if (dInfo == null || dInfo.getCompleteTime() == null) { // deployment in progress?
      myListener.deploymentInProgress(deploymentId, getInstancesStatus(dInfo));
      return null;
    }

    if (isSuccess(dInfo)) {
      myListener.deploymentSucceeded(deploymentId, getInstancesStatus(dInfo));
    } else {
      myListener.deploymentFailed(deploymentId, null, getErrorInfo(dInfo), getInstancesStatus(dInfo));
    }

    return dInfo.getCompleteTime();
  }