Search in sources :

Example 1 with Dependency

use of com.walmartlabs.concord.policyengine.DependencyVersionsPolicy.Dependency in project concord by walmartlabs.

the class JobDependencies method getDependencyVersions.

private static Map<String, String> getDependencyVersions(RunnerJob job) throws ExecutionException {
    Map<String, String> result = getDependencyVersionsFromFile(job);
    PolicyEngine pe = job.getPolicyEngine();
    if (pe != null) {
        // make mutable
        result = new HashMap<>(result);
        result.putAll(pe.getDefaultDependencyVersionsPolicy().get().stream().collect(Collectors.toMap(Dependency::getArtifact, Dependency::getVersion)));
    }
    return result;
}
Also used : PolicyEngine(com.walmartlabs.concord.policyengine.PolicyEngine) Dependency(com.walmartlabs.concord.policyengine.DependencyVersionsPolicy.Dependency)

Aggregations

Dependency (com.walmartlabs.concord.policyengine.DependencyVersionsPolicy.Dependency)1 PolicyEngine (com.walmartlabs.concord.policyengine.PolicyEngine)1