com.clarolab.bamboo.entities.BambooResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bamboo-rest-api-client Show documentation
Show all versions of bamboo-rest-api-client Show documentation
This library allows to extract information from projects, plans and builds on Bamboo
package com.clarolab.bamboo.entities;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import java.util.List;
import java.util.stream.Collectors;
@Getter
@Setter
@ToString
public class BambooResult extends BambooBase{
@ToString.Include
private String planName;
@ToString.Include
private String projectName;
private String buildResultKey;
private String lifeCycleState;
@ToString.Include
private long id;
private String buildStartedTime;
private String buildCompletedTime;
private long buildDuration;
private String buildState;
private int buildNumber;
private BambooArtifacts artifacts;
@ToString.Include
private BambooStages stages;
public List getArtifacts(){
if(stages != null)
return stages.getAllArtifacts();
return artifacts.getArtifacts();
}
public List getStages(){
return stages.getStages();
}
public String getUrl(){
return getLink().getHref().replaceFirst("rest/api/.*/result", "browse");
}
public List getJobKeys(){
return getArtifacts().stream().map(artifact -> artifact.getJobKey()).distinct().collect(Collectors.toList());
}
}