use of com.synopsys.integration.detect.workflow.result.ReportDetectResult in project synopsys-detect by blackducksoftware.
the class DetectStatusLoggerTest method createResults.
private List<DetectResult> createResults() {
ArrayList<DetectResult> detectResults = new ArrayList<>();
DetectResult result = new BlackDuckBomDetectResult("https://example.com/api/projects/project_1");
detectResults.add(result);
result = new BlackDuckBomDetectResult("https://example.com/api/projects/project_2");
detectResults.add(result);
result = new AirGapDetectResult("./air_gap/directory");
detectResults.add(result);
result = new ReportDetectResult("report_1", "./report/1/report_file");
detectResults.add(result);
return detectResults;
}
use of com.synopsys.integration.detect.workflow.result.ReportDetectResult in project synopsys-detect by blackducksoftware.
the class IntelligentModeStepRunner method riskReport.
public void riskReport(BlackDuckRunData blackDuckRunData, ProjectVersionWrapper projectVersion) throws IOException, OperationException {
Optional<File> riskReportFile = operationFactory.calculateRiskReportFileLocation();
if (riskReportFile.isPresent()) {
logger.info("Creating risk report pdf");
File reportDirectory = riskReportFile.get();
if (!reportDirectory.exists() && !reportDirectory.mkdirs()) {
logger.warn(String.format("Failed to create risk report pdf directory: %s", reportDirectory));
}
File createdPdf = operationFactory.createRiskReportFile(blackDuckRunData, projectVersion, reportDirectory);
logger.info(String.format("Created risk report pdf: %s", createdPdf.getCanonicalPath()));
operationFactory.publishReport(new ReportDetectResult("Risk Report", createdPdf.getCanonicalPath()));
}
}
use of com.synopsys.integration.detect.workflow.result.ReportDetectResult in project synopsys-detect by blackducksoftware.
the class IntelligentModeStepRunner method noticesReport.
public void noticesReport(BlackDuckRunData blackDuckRunData, ProjectVersionWrapper projectVersion) throws OperationException, IOException {
Optional<File> noticesReportDirectory = operationFactory.calculateNoticesDirectory();
if (noticesReportDirectory.isPresent()) {
logger.info("Creating notices report");
File noticesDirectory = noticesReportDirectory.get();
if (!noticesDirectory.exists() && !noticesDirectory.mkdirs()) {
logger.warn(String.format("Failed to create notices directory at %s", noticesDirectory));
}
File noticesFile = operationFactory.createNoticesReportFile(blackDuckRunData, projectVersion, noticesDirectory);
logger.info(String.format("Created notices report: %s", noticesFile.getCanonicalPath()));
operationFactory.publishReport(new ReportDetectResult("Notices Report", noticesFile.getCanonicalPath()));
}
}
Aggregations