use of com.synopsys.integration.detect.lifecycle.run.operation.blackduck.BdioUploadResult in project synopsys-detect by blackducksoftware.
the class IntelligentModeStepRunner method uploadBdio.
public void uploadBdio(BlackDuckRunData blackDuckRunData, BdioResult bdioResult, CodeLocationAccumulator codeLocationAccumulator) throws OperationException, IntegrationException {
// TODO: Move to a decision
BdioOptions bdioOptions = operationFactory.calculateBdioOptions();
BdioUploadResult uploadResult;
if (bdioOptions.isLegacyUploadEnabled()) {
if (bdioOptions.isBdio2Enabled()) {
uploadResult = operationFactory.uploadBdio2(blackDuckRunData, bdioResult);
} else {
uploadResult = operationFactory.uploadBdio1(blackDuckRunData, bdioResult);
}
} else {
uploadResult = operationFactory.uploadBdioIntelligentPersistent(blackDuckRunData, bdioResult);
}
uploadResult.getUploadOutput().ifPresent(codeLocationAccumulator::addWaitableCodeLocation);
}
use of com.synopsys.integration.detect.lifecycle.run.operation.blackduck.BdioUploadResult in project synopsys-detect by blackducksoftware.
the class IntelligentModeStepRunner method uploadBdio.
public void uploadBdio(BlackDuckRunData blackDuckRunData, BdioResult bdioResult, CodeLocationAccumulator codeLocationAccumulator, Long timeout) throws OperationException {
BdioUploadResult uploadResult = operationFactory.uploadBdioIntelligentPersistent(blackDuckRunData, bdioResult, timeout);
uploadResult.getUploadOutput().ifPresent(codeLocationAccumulator::addWaitableCodeLocations);
}
use of com.synopsys.integration.detect.lifecycle.run.operation.blackduck.BdioUploadResult in project synopsys-detect by blackducksoftware.
the class BdioUploadOperation method uploadBdioFiles.
public BdioUploadResult uploadBdioFiles(BdioResult bdioResult) throws DetectUserFriendlyException {
UploadBatch uploadBatch = createBatch(bdioResult);
CodeLocationCreationData<UploadBatchOutput> response;
try {
response = executeUpload(uploadBatch);
} catch (IntegrationException ex) {
logger.error("Error uploading bdio files", ex);
throw new DetectUserFriendlyException("Error uploading bdio files", ex, ExitCodeType.FAILURE_BLACKDUCK_FEATURE_ERROR);
}
checkForUploadFailure(response);
return new BdioUploadResult(response);
}
Aggregations