Search in sources :

Example 1 with BdioUploadResult

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);
}
Also used : BdioUploadResult(com.synopsys.integration.detect.lifecycle.run.operation.blackduck.BdioUploadResult) BdioOptions(com.synopsys.integration.detect.workflow.bdio.BdioOptions)

Example 2 with BdioUploadResult

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);
}
Also used : BdioUploadResult(com.synopsys.integration.detect.lifecycle.run.operation.blackduck.BdioUploadResult)

Example 3 with BdioUploadResult

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);
}
Also used : UploadBatchOutput(com.synopsys.integration.blackduck.codelocation.upload.UploadBatchOutput) DetectUserFriendlyException(com.synopsys.integration.detect.configuration.DetectUserFriendlyException) IntegrationException(com.synopsys.integration.exception.IntegrationException) BdioUploadResult(com.synopsys.integration.detect.lifecycle.run.operation.blackduck.BdioUploadResult) UploadBatch(com.synopsys.integration.blackduck.codelocation.upload.UploadBatch)

Aggregations

BdioUploadResult (com.synopsys.integration.detect.lifecycle.run.operation.blackduck.BdioUploadResult)3 UploadBatch (com.synopsys.integration.blackduck.codelocation.upload.UploadBatch)1 UploadBatchOutput (com.synopsys.integration.blackduck.codelocation.upload.UploadBatchOutput)1 DetectUserFriendlyException (com.synopsys.integration.detect.configuration.DetectUserFriendlyException)1 BdioOptions (com.synopsys.integration.detect.workflow.bdio.BdioOptions)1 IntegrationException (com.synopsys.integration.exception.IntegrationException)1