Search in sources :

Example 1 with BuildView

use of net.nemerosa.ontrack.model.structure.BuildView in project ontrack by nemerosa.

the class SCMUtilsServiceImpl method getBranchInfo.

@Override
public SCMIssueCommitBranchInfo getBranchInfo(Optional<Build> buildAfterCommit, SCMIssueCommitBranchInfo branchInfo) {
    SCMIssueCommitBranchInfo info = branchInfo;
    if (buildAfterCommit.isPresent()) {
        Build build = buildAfterCommit.get();
        // Gets the build view
        BuildView buildView = structureService.getBuildView(build, true);
        // Adds it to the list
        info = info.withBuildView(buildView);
        // Collects the promotions for the branch
        info = info.withBranchStatusView(structureService.getEarliestPromotionsAfterBuild(build));
    }
    // OK
    return info;
}
Also used : BuildView(net.nemerosa.ontrack.model.structure.BuildView) Build(net.nemerosa.ontrack.model.structure.Build) SCMIssueCommitBranchInfo(net.nemerosa.ontrack.extension.scm.model.SCMIssueCommitBranchInfo)

Aggregations

SCMIssueCommitBranchInfo (net.nemerosa.ontrack.extension.scm.model.SCMIssueCommitBranchInfo)1 Build (net.nemerosa.ontrack.model.structure.Build)1 BuildView (net.nemerosa.ontrack.model.structure.BuildView)1