use of com.thoughtworks.go.domain.PipelineDependencyGraphOld in project gocd by gocd.
the class PipelineHistoryService method pipelineDependencyGraph.
public PipelineDependencyGraphOld pipelineDependencyGraph(String pipelineName, int pipelineCounter, final Username username, OperationResult result) {
if (!validate(pipelineName, username, result)) {
return null;
}
PipelineDependencyGraphOld graph = pipelineDao.pipelineGraphByNameAndCounter(pipelineName, pipelineCounter);
if (graph == null) {
String message = String.format("Pipeline [%s] with counter [%s] is not found", pipelineName, pipelineCounter);
result.notFound(message, message, HealthStateType.general(HealthStateScope.forPipeline(pipelineName)));
return null;
}
removePipelinesThatAreNotInConfig(username, graph);
addConfiguredPipelinesThatAreNotRunYet(username, graph, goConfigService.downstreamPipelinesOf(pipelineName));
populatePipelineState(graph.pipeline(), username);
for (PipelineInstanceModel pipelineInstanceModel : graph.dependencies()) {
populateDownstreamPipelineState(username, pipelineInstanceModel);
}
return graph;
}
Aggregations