Search in sources :

Example 1 with Revision

use of com.thoughtworks.go.domain.valuestreammap.Revision in project gocd by gocd.

the class DownstreamInstancePopulator method populateRevisionsForAllChildrenOf.

private void populateRevisionsForAllChildrenOf(Node node, Set<Revision> visitedRevisions) {
    for (Revision revision : node.revisions()) {
        if (visitedRevisions.contains(revision)) {
            continue;
        }
        visitedRevisions.add(revision);
        for (Node child : node.getChildren()) {
            List<PipelineIdentifier> pipelineIdentifiers = pipelineDao.getPipelineInstancesTriggeredWithDependencyMaterial(child.getName(), ((PipelineRevision) revision).getPipelineIdentifier());
            addRevisionsToNode(child, pipelineIdentifiers);
            populateRevisionsForAllChildrenOf(child, visitedRevisions);
        }
    }
}
Also used : Revision(com.thoughtworks.go.domain.valuestreammap.Revision) PipelineRevision(com.thoughtworks.go.domain.valuestreammap.PipelineRevision) PipelineIdentifier(com.thoughtworks.go.domain.PipelineIdentifier) Node(com.thoughtworks.go.domain.valuestreammap.Node)

Example 2 with Revision

use of com.thoughtworks.go.domain.valuestreammap.Revision in project gocd by gocd.

the class RunStagesPopulator method apply.

public void apply(ValueStreamMap graph) {
    for (Node node : graph.allNodes()) {
        for (Revision revision : node.revisions()) {
            if (revision instanceof PipelineRevision) {
                PipelineRevision pipelineRevision = (PipelineRevision) revision;
                Stages latestStages = latestRunStagesForRevsion(pipelineRevision);
                pipelineRevision.addStages(latestStages);
            }
        }
    }
}
Also used : Revision(com.thoughtworks.go.domain.valuestreammap.Revision) PipelineRevision(com.thoughtworks.go.domain.valuestreammap.PipelineRevision) Node(com.thoughtworks.go.domain.valuestreammap.Node) PipelineRevision(com.thoughtworks.go.domain.valuestreammap.PipelineRevision) Stages(com.thoughtworks.go.domain.Stages)

Aggregations

Node (com.thoughtworks.go.domain.valuestreammap.Node)2 PipelineRevision (com.thoughtworks.go.domain.valuestreammap.PipelineRevision)2 Revision (com.thoughtworks.go.domain.valuestreammap.Revision)2 PipelineIdentifier (com.thoughtworks.go.domain.PipelineIdentifier)1 Stages (com.thoughtworks.go.domain.Stages)1