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

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

Introduction

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

Prototype


public void setPhaseStatus(StatusType phaseStatus) 

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 ww w.  j a v a2s  .c o  m*/
        }
        latest.setDurationInSeconds(0L);
    }
}