use of com.atlassian.stash.internal.build.InternalBuildStatus in project stashbot by palantir.
the class BuildSuccessReportingServlet method getSuccessStatus.
private BuildStatus getSuccessStatus(Repository repo, JobTemplate jt, State state, long buildNumber, String buildHead) throws SQLException {
Date now = new Date(java.lang.System.currentTimeMillis());
DateFormat df = DateFormat.getDateInstance();
// key will be the jenkins name
String key = jt.getBuildNameFor(repo);
String name = key + " (build " + Long.toString(buildNumber) + ")";
String description = "Build " + Long.toString(buildNumber) + " " + state.toString() + " at " + df.format(now);
String url = getJenkinsUrl(repo, jt, buildNumber);
BuildStatus bs = new InternalBuildStatus(state, name, name, url, description, now);
return bs;
}
Aggregations