Example usage for com.amazonaws.services.codebuild.model BuildPhase getPhaseStatus

List of usage examples for com.amazonaws.services.codebuild.model BuildPhase getPhaseStatus

Introduction

In this page you can find the example usage for com.amazonaws.services.codebuild.model BuildPhase getPhaseStatus.

Prototype


public String getPhaseStatus() 

Source Link

Document

The current status of the build phase.

Usage

From source file:CodeBuildAction.java

License:Open Source License

private void formatLatestPhase() {
    if (phases != null && !phases.isEmpty()) {
        BuildPhase latest = phases.get(phases.size() - 1);
        if (latest.getPhaseStatus() == null) {
            if (latest.getPhaseType().equals("COMPLETED")) {
                latest.setPhaseStatus(StatusType.SUCCEEDED.toString().toUpperCase(Locale.ENGLISH));
            } else {
                latest.setPhaseStatus("IN PROGRESS");
            }/*from  w ww  . j a  v a 2 s  . c o  m*/
        }
        latest.setDurationInSeconds(0L);
    }
}

From source file:CodeBuildAction.java

License:Open Source License

private BuildPhase getErrorPhase() {
    if (phases != null) {
        for (BuildPhase p : phases) {
            String status = p.getPhaseStatus();
            if (status != null) {
                if (status.equals(StatusType.FAULT.toString().toUpperCase(Locale.ENGLISH))
                        || status.equals("CLIENT_ERROR")
                        || status.equals(StatusType.FAILED.toString().toUpperCase(Locale.ENGLISH))) {
                    return p;
                }// w  ww .  j a v  a2 s .c o m
            }
        }
    }
    return null;
}