Example usage for com.amazonaws.services.codedeploy.model DeploymentInfo getDeploymentOverview

List of usage examples for com.amazonaws.services.codedeploy.model DeploymentInfo getDeploymentOverview

Introduction

In this page you can find the example usage for com.amazonaws.services.codedeploy.model DeploymentInfo getDeploymentOverview.

Prototype


public DeploymentOverview getDeploymentOverview() 

Source Link

Document

A summary of the deployment status of the instances in the deployment.

Usage

From source file:jetbrains.buildServer.runner.codedeploy.AWSClient.java

License:Apache License

@Contract("null -> null")
@Nullable/*from  w w w.  ja  v a  2 s .  c  o  m*/
private Listener.InstancesStatus getInstancesStatus(@Nullable DeploymentInfo dInfo) {
    if (dInfo == null)
        return null;
    if (dInfo.getStatus() == null || dInfo.getDeploymentOverview() == null)
        return null;

    final Listener.InstancesStatus instancesStatus = new Listener.InstancesStatus();
    instancesStatus.status = getHumanReadableStatus(dInfo.getStatus());

    final DeploymentOverview overview = dInfo.getDeploymentOverview();
    instancesStatus.succeeded = getInt(overview.getSucceeded());
    instancesStatus.failed = getInt(overview.getFailed());
    instancesStatus.inProgress = getInt(overview.getInProgress());
    instancesStatus.skipped = getInt(overview.getSkipped());
    instancesStatus.pending = getInt(overview.getPending());

    return instancesStatus;
}