parse results with hardcoding
package com.synopsys.integration.detect.lifecycle.run.step;
import java.io.File;
+import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
@@ -16,6 +17,7 @@ import com.synopsys.integration.detect.lifecycle.run.operation.OperationRunner;
import com.synopsys.integration.detect.lifecycle.run.step.utility.StepHelper;
import com.synopsys.integration.detect.tool.signaturescanner.SignatureScannerCodeLocationResult;
import com.synopsys.integration.detect.workflow.bdio.BdioResult;
+import com.synopsys.integration.detect.workflow.blackduck.codelocation.CodeLocationAccumulator;
import com.synopsys.integration.detect.workflow.blackduck.developer.aggregate.RapidScanResultSummary;
import com.synopsys.integration.rest.HttpUrl;
import com.synopsys.integration.util.NameVersion;
@@ -35,6 +37,7 @@ public class RapidModeStepRunner {
Optional<File> rapidScanConfig = operationRunner.findRapidScanConfig();
rapidScanConfig.ifPresent(config -> logger.info("Found rapid scan config file: {}", config));
+ stepHelper.runToolIfIncluded(DetectTool.DETECTOR, "detector", () -> {
if (bdioResult.isNotEmpty()) {
List<HttpUrl> rapidScanUrls = operationRunner.performRapidUpload(blackDuckRunData, bdioResult, rapidScanConfig.orElse(null));
List<DeveloperScanComponentResultView> rapidResults = operationRunner.waitForRapidResults(blackDuckRunData, rapidScanUrls);
@@ -45,6 +48,7 @@ public class RapidModeStepRunner {
} else {
logger.debug("No BDIO results to upload. Skipping.");
}
+ });
stepHelper.runToolIfIncluded(DetectTool.SIGNATURE_SCAN, "Signature Scanner", () -> {
logger.debug("Rapid scan signature scan detected.");
@@ -55,7 +59,22 @@ public class RapidModeStepRunner {
projectVersion,
dockerTargetData
);
- String breakpoint = "";
+// CodeLocationAccumulator codeLocationAccumulator = new CodeLocationAccumulator();
+// codeLocationAccumulator.addWaitableCodeLocations(signatureScannerCodeLocationResult.getWaitableCodeLocationData());
+// String breakpoint = "";
+
+ String hardcodedUrl = "https://localhost/api/developer-scans/80dde241-5964-486a-82c8-2031def411c3";
+ HttpUrl rapidScanUrl = new HttpUrl(hardcodedUrl);
+ //getRapidSignatureScanUrlFromFile();
+ List<HttpUrl> rapidScanUrls = new ArrayList<>();
+ rapidScanUrls.add(rapidScanUrl);
+
+ List<DeveloperScanComponentResultView> rapidResults = operationRunner.waitForRapidResults(blackDuckRunData, rapidScanUrls);
+
+ File jsonFile = operationRunner.generateRapidJsonFile(projectVersion, rapidResults);
+ RapidScanResultSummary summary = operationRunner.logRapidReport(rapidResults);
+ operationRunner.publishRapidResults(jsonFile, summary);
+
});
}
}
