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

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

Introduction

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

Prototype


public void setDurationInSeconds(Long durationInSeconds) 

Source Link

Document

How long, in seconds, between the starting and ending times of the build's 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  .java  2  s  .  c o m
        }
        latest.setDurationInSeconds(0L);
    }
}