List of usage examples for com.amazonaws.services.codebuild.model BuildPhase getContexts
public java.util.List<PhaseContext> getContexts()
Additional information about a build phase, especially to help troubleshoot a failed build.
From source file:CodeBuildAction.java
License:Open Source License
public String getPhaseErrorMessage() { BuildPhase errorPhase = getErrorPhase(); if (errorPhase == null) { return ""; } else {/* w w w.j av a 2 s. co m*/ if (!errorPhase.getContexts().isEmpty()) { String ret = errorPhase.getContexts().get(0).getMessage().replace("'", "").replace("\n", "") + " (status code: " + errorPhase.getContexts().get(0).getStatusCode() + ")"; return ret; } else { return ""; } } }