use of com.epam.pipeline.entity.docker.ManifestV2 in project cloud-pipeline by epam.
the class AggregatingToolScanManager method fetchLayers.
private List<String> fetchLayers(Tool tool, String tag, DockerRegistry registry) throws ToolScanExternalServiceException {
DockerClient dockerClient = getDockerClient(tool.getImage(), registry);
ManifestV2 manifest = dockerClient.getManifest(registry, tool.getImage(), tag).orElseThrow(() -> new ToolScanExternalServiceException(tool, messageHelper.getMessage(MessageConstants.ERROR_REGISTRY_COULD_NOT_GET_MANIFEST, tool.getImage())));
return manifest.getLayers().stream().map(c -> c.getDigest()).collect(Collectors.toList());
}
Aggregations