Skip to content

Commit

Permalink
Merge pull request #443 from blackducksoftware/sierra/idetect-4487
Browse files Browse the repository at this point in the history
Update synopsys references to Blackduck
  • Loading branch information
devmehtabd authored Sep 17, 2024
2 parents 52d6ed4 + 31f9d84 commit 020f43a
Show file tree
Hide file tree
Showing 276 changed files with 3,213 additions and 3,638 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ out/
build/

src/test/resources/test.properties
src/main/resources/com/synopsys/integration/blackduck/version.txt
src/main/resources/com/blackduck/integration/blackduck/version.txt
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jdk:
notifications:
email:
recipients:
- starlabs@synopsys.com
- starlabs@blackduck.com

script:
- "./gradlew clean build"
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
## Overview ##
The blackduck-common library supplies convenient communication with a Black Duck server through REST API's as well as providing convenient ways to download the CLI and execute it.

## Build ##

[![Build Status](https://travis-ci.org/blackducksoftware/blackduck-common.svg?branch=master)](https://travis-ci.org/blackducksoftware/blackduck-common)
[![Coverage Status](https://coveralls.io/repos/github/blackducksoftware/blackduck-common/badge.svg?branch=master)](https://coveralls.io/github/blackducksoftware/blackduck-common?branch=master)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Black Duck Security Risk](https://copilot.blackducksoftware.com/github/repos/blackducksoftware/blackduck-common/branches/master/badge-risk.svg)](https://copilot.blackducksoftware.com/github/repos/blackducksoftware/blackduck-common/branches/master)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=com.synopsys.integration%3Ablackduck-common&metric=alert_status)](https://sonarcloud.io/dashboard?id=com.synopsys.integration%3Ablackduck-common)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=com.blackduck.integration%3Ablackduck-common&metric=alert_status)](https://sonarcloud.io/dashboard?id=com.blackduck.integration%3Ablackduck-common)

## Where can I get the latest release? ##
You can download the latest release from Maven Central.
Expand Down
20 changes: 10 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ buildscript {
javaSourceCompatibility = 8
}

dependencies { classpath "com.synopsys.integration:common-gradle-plugin:${managedCgpVersion}" }
dependencies { classpath "com.blackduck.integration:common-gradle-plugin:${managedCgpVersion}" }
}

project.ext.moduleName = 'com.synopsys.integration.blackduck-common'
project.ext.moduleName = 'com.blackduck.integration.blackduck-common'
project.ext.javaUseAutoModuleName = 'true'
project.ext.junitShowStandardStreams = 'true'

version = '66.2.32-SNAPSHOT'
version = '67.0.0-SNAPSHOT'

description = 'A library for using various capabilities of Black Duck, notably the REST API and signature scanning.'

apply plugin: 'com.synopsys.integration.library'
apply plugin: 'com.blackduck.integration.library'

final def versionFile = new File("${projectDir}/src/main/resources/com/synopsys/integration/blackduck/version.txt")
final def versionFile = new File("${projectDir}/src/main/resources/com/blackduck/integration/blackduck/version.txt")
versionFile.mkdirs()
versionFile.delete()
versionFile << version
Expand All @@ -29,14 +29,14 @@ final def internalRepoHost = System.getenv('SNPS_INTERNAL_ARTIFACTORY')

repositories {
maven { url "${internalRepoHost}/artifactory/jcenter" }
maven { url "https://sig-repo.synopsys.com/bds-bdio-release" }
maven { url "https://sig-repo.synopsys.com/artifactory/bds-integrations-snapshot/" }
maven { url "https://repo.blackduck.com/bds-bdio-release" }
maven { url "https://repo.blackduck.com/artifactory/bds-integrations-snapshot/" }
}

dependencies {
api 'com.synopsys.integration:blackduck-common-api:2023.4.2.5'
api 'com.synopsys.integration:phone-home-client:6.0.1'
api 'com.synopsys.integration:integration-bdio:26.0.13'
api 'com.blackduck.integration:blackduck-common-api:2023.10.0.5'
api 'com.blackduck.integration:phone-home-client:7.0.0'
api 'com.blackduck.integration:integration-bdio:27.0.0'
api 'com.blackducksoftware.bdio:bdio2:3.2.5'

testImplementation 'com.google.guava:guava:31.1-jre'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* blackduck-common
*
* Copyright (c) 2024 Black Duck Software, Inc.
*
* Use subject to the terms and conditions of the Black Duck Software End User Software License and Maintenance Agreement. All rights reserved worldwide.
*/
package com.blackduck.integration.blackduck.api.enumeration;

public enum PolicyRuleComponentUsageValueSetType {
DYNAMICALLY_LINKED,
STATICALLY_LINKED,
SOURCE_CODE,
DEV_TOOL_EXCLUDED,
SEPARATE_WORK,
IMPLEMENTATION_OF_STANDARD
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* blackduck-common
*
* Copyright (c) 2024 Black Duck Software, Inc.
*
* Use subject to the terms and conditions of the Black Duck Software End User Software License and Maintenance Agreement. All rights reserved worldwide.
*/
package com.blackduck.integration.blackduck.api.enumeration;

public enum PolicyRuleConditionOperatorType {
EQ,
NE,
LT,
GT,
IN,
NOT_IN,
GE;

}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
* blackduck-common
*
* Copyright (c) 2024 Synopsys, Inc.
* Copyright (c) 2024 Black Duck Software, Inc.
*
* Use subject to the terms and conditions of the Synopsys End User Software License and Maintenance Agreement. All rights reserved worldwide.
* Use subject to the terms and conditions of the Black Duck Software End User Software License and Maintenance Agreement. All rights reserved worldwide.
*/
package com.synopsys.integration.blackduck.api.enumeration;
package com.blackduck.integration.blackduck.api.enumeration;

public enum PolicyRuleConditionType {
PROJECT_NAME("Project Name"),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
/*
* blackduck-common
*
* Copyright (c) 2024 Synopsys, Inc.
* Copyright (c) 2024 Black Duck Software, Inc.
*
* Use subject to the terms and conditions of the Synopsys End User Software License and Maintenance Agreement. All rights reserved worldwide.
* Use subject to the terms and conditions of the Black Duck Software End User Software License and Maintenance Agreement. All rights reserved worldwide.
*/
package com.synopsys.integration.blackduck.api.enumeration;
package com.blackduck.integration.blackduck.api.enumeration;

import com.blackduck.integration.blackduck.api.generated.enumeration.PolicyRuleSeverityType;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

import com.synopsys.integration.blackduck.api.generated.enumeration.PolicyRuleSeverityType;

public enum RankedSeverityType {
UNSPECIFIED(PolicyRuleSeverityType.UNSPECIFIED),
TRIVIAL(PolicyRuleSeverityType.TRIVIAL),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* blackduck-common
*
* Copyright (c) 2024 Black Duck Software, Inc.
*
* Use subject to the terms and conditions of the Black Duck Software End User Software License and Maintenance Agreement. All rights reserved worldwide.
*/
package com.blackduck.integration.blackduck.api.enumeration;

public enum ReviewStatusType {
NOT_REVIEWED,
REVIEWED
}
Original file line number Diff line number Diff line change
@@ -1,34 +1,33 @@
/*
* blackduck-common
*
* Copyright (c) 2024 Synopsys, Inc.
* Copyright (c) 2024 Black Duck Software, Inc.
*
* Use subject to the terms and conditions of the Synopsys End User Software License and Maintenance Agreement. All rights reserved worldwide.
* Use subject to the terms and conditions of the Black Duck Software End User Software License and Maintenance Agreement. All rights reserved worldwide.
*/
package com.synopsys.integration.blackduck.bdio2;
package com.blackduck.integration.blackduck.bdio2;

import com.blackduck.integration.blackduck.api.generated.discovery.ApiDiscovery;
import com.blackduck.integration.blackduck.bdio2.model.BdioFileContent;
import com.blackduck.integration.blackduck.bdio2.util.Bdio2ContentExtractor;
import com.blackduck.integration.blackduck.codelocation.upload.UploadTarget;
import com.blackduck.integration.blackduck.exception.BlackDuckIntegrationException;
import com.blackduck.integration.blackduck.service.BlackDuckApiClient;
import com.blackduck.integration.blackduck.service.DataService;
import com.blackduck.integration.blackduck.service.request.BlackDuckRequestBuilderEditor;
import com.blackduck.integration.blackduck.version.BlackDuckVersion;
import com.blackduck.integration.exception.IntegrationException;
import com.blackduck.integration.log.IntLogger;
import com.blackduck.integration.util.NameVersion;
import com.blackduck.integration.wait.ResilientJobConfig;
import com.blackduck.integration.wait.ResilientJobExecutor;
import com.blackduck.integration.wait.tracker.WaitIntervalTracker;
import com.blackduck.integration.wait.tracker.WaitIntervalTrackerFactory;
import org.jetbrains.annotations.Nullable;

import java.util.List;
import java.util.stream.Collectors;

import org.jetbrains.annotations.Nullable;

import com.synopsys.integration.blackduck.api.generated.discovery.ApiDiscovery;
import com.synopsys.integration.blackduck.bdio2.model.BdioFileContent;
import com.synopsys.integration.blackduck.bdio2.util.Bdio2ContentExtractor;
import com.synopsys.integration.blackduck.codelocation.upload.UploadTarget;
import com.synopsys.integration.blackduck.exception.BlackDuckIntegrationException;
import com.synopsys.integration.blackduck.service.BlackDuckApiClient;
import com.synopsys.integration.blackduck.service.DataService;
import com.synopsys.integration.blackduck.service.request.BlackDuckRequestBuilderEditor;
import com.synopsys.integration.blackduck.version.BlackDuckVersion;
import com.synopsys.integration.exception.IntegrationException;
import com.synopsys.integration.log.IntLogger;
import com.synopsys.integration.util.NameVersion;
import com.synopsys.integration.wait.ResilientJobConfig;
import com.synopsys.integration.wait.ResilientJobExecutor;
import com.synopsys.integration.wait.tracker.WaitIntervalTracker;
import com.synopsys.integration.wait.tracker.WaitIntervalTrackerFactory;

public class Bdio2FileUploadService extends DataService {
private static final String FILE_NAME_BDIO_HEADER_JSONLD = "bdio-header.jsonld";
private static final int BD_WAIT_AND_RETRY_INTERVAL = 30;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
/*
* blackduck-common
*
* Copyright (c) 2024 Synopsys, Inc.
* Copyright (c) 2024 Black Duck Software, Inc.
*
* Use subject to the terms and conditions of the Synopsys End User Software License and Maintenance Agreement. All rights reserved worldwide.
* Use subject to the terms and conditions of the Black Duck Software End User Software License and Maintenance Agreement. All rights reserved worldwide.
*/
package com.synopsys.integration.blackduck.bdio2;

import java.util.Arrays;
import java.util.List;
package com.blackduck.integration.blackduck.bdio2;

import com.blackduck.integration.blackduck.bdio2.model.BdioFileContent;
import com.blackduck.integration.blackduck.exception.BlackDuckIntegrationException;
import com.blackduck.integration.blackduck.service.request.BlackDuckRequestBuilderEditor;
import com.blackduck.integration.exception.IntegrationException;
import com.blackduck.integration.rest.HttpUrl;
import com.blackduck.integration.rest.exception.IntegrationRestException;
import com.blackduck.integration.rest.response.Response;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.synopsys.integration.blackduck.bdio2.model.BdioFileContent;
import com.synopsys.integration.blackduck.exception.BlackDuckIntegrationException;
import com.synopsys.integration.blackduck.service.request.BlackDuckRequestBuilderEditor;
import com.synopsys.integration.exception.IntegrationException;
import com.synopsys.integration.rest.HttpUrl;
import com.synopsys.integration.rest.exception.IntegrationRestException;
import com.synopsys.integration.rest.response.Response;
import java.util.Arrays;
import java.util.List;

public class Bdio2RetryAwareStreamUploader {
private static final List<Integer> NON_RETRYABLE_EXIT_CODES = Arrays.asList(401, 402, 403, 404, 409);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,32 +1,28 @@
/*
* blackduck-common
*
* Copyright (c) 2024 Synopsys, Inc.
* Copyright (c) 2024 Black Duck Software, Inc.
*
* Use subject to the terms and conditions of the Synopsys End User Software License and Maintenance Agreement. All rights reserved worldwide.
* Use subject to the terms and conditions of the Black Duck Software End User Software License and Maintenance Agreement. All rights reserved worldwide.
*/
package com.synopsys.integration.blackduck.bdio2;

import java.nio.charset.StandardCharsets;
import java.time.Duration;
import java.util.Arrays;
import java.util.List;
package com.blackduck.integration.blackduck.bdio2;

import com.blackduck.integration.blackduck.api.core.BlackDuckPath;
import com.blackduck.integration.blackduck.api.core.BlackDuckResponse;
import com.blackduck.integration.blackduck.api.generated.discovery.ApiDiscovery;
import com.blackduck.integration.blackduck.bdio2.model.BdioFileContent;
import com.blackduck.integration.blackduck.http.BlackDuckRequestBuilder;
import com.blackduck.integration.blackduck.service.BlackDuckApiClient;
import com.blackduck.integration.blackduck.service.request.BlackDuckRequestBuilderEditor;
import com.blackduck.integration.blackduck.service.request.BlackDuckResponseRequest;
import com.blackduck.integration.exception.IntegrationException;
import com.blackduck.integration.log.IntLogger;
import com.blackduck.integration.rest.HttpUrl;
import com.blackduck.integration.rest.response.Response;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.entity.ContentType;

import com.synopsys.integration.blackduck.api.core.BlackDuckPath;
import com.synopsys.integration.blackduck.api.core.BlackDuckResponse;
import com.synopsys.integration.blackduck.api.generated.discovery.ApiDiscovery;
import com.synopsys.integration.blackduck.bdio2.model.BdioFileContent;
import com.synopsys.integration.blackduck.http.BlackDuckRequestBuilder;
import com.synopsys.integration.blackduck.service.BlackDuckApiClient;
import com.synopsys.integration.blackduck.service.request.BlackDuckRequestBuilderEditor;
import com.synopsys.integration.blackduck.service.request.BlackDuckResponseRequest;
import com.synopsys.integration.exception.IntegrationException;
import com.synopsys.integration.log.IntLogger;
import com.synopsys.integration.rest.HttpUrl;
import com.synopsys.integration.rest.response.Response;
import java.nio.charset.StandardCharsets;

public class Bdio2StreamUploader {
// IDETECT-2756
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
/*
* blackduck-common
*
* Copyright (c) 2024 Synopsys, Inc.
* Copyright (c) 2024 Black Duck Software, Inc.
*
* Use subject to the terms and conditions of the Synopsys End User Software License and Maintenance Agreement. All rights reserved worldwide.
* Use subject to the terms and conditions of the Black Duck Software End User Software License and Maintenance Agreement. All rights reserved worldwide.
*/
package com.synopsys.integration.blackduck.bdio2;

import java.util.List;
package com.blackduck.integration.blackduck.bdio2;

import com.blackduck.integration.blackduck.bdio2.model.BdioFileContent;
import com.blackduck.integration.blackduck.service.request.BlackDuckRequestBuilderEditor;
import com.blackduck.integration.exception.IntegrationException;
import com.blackduck.integration.exception.IntegrationTimeoutException;
import com.blackduck.integration.rest.HttpUrl;
import com.blackduck.integration.rest.response.Response;
import com.blackduck.integration.wait.ResilientJob;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.synopsys.integration.blackduck.bdio2.model.BdioFileContent;
import com.synopsys.integration.blackduck.service.request.BlackDuckRequestBuilderEditor;
import com.synopsys.integration.exception.IntegrationException;
import com.synopsys.integration.exception.IntegrationTimeoutException;
import com.synopsys.integration.rest.HttpUrl;
import com.synopsys.integration.rest.response.Response;
import com.synopsys.integration.wait.ResilientJob;
import java.util.List;

public class Bdio2UploadJob implements ResilientJob<Bdio2UploadResult> {
private final Logger logger = LoggerFactory.getLogger(this.getClass());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/*
* blackduck-common
*
* Copyright (c) 2024 Synopsys, Inc.
* Copyright (c) 2024 Black Duck Software, Inc.
*
* Use subject to the terms and conditions of the Synopsys End User Software License and Maintenance Agreement. All rights reserved worldwide.
* Use subject to the terms and conditions of the Black Duck Software End User Software License and Maintenance Agreement. All rights reserved worldwide.
*/
package com.synopsys.integration.blackduck.bdio2;
package com.blackduck.integration.blackduck.bdio2;

import com.synopsys.integration.rest.HttpUrl;
import com.blackduck.integration.rest.HttpUrl;

public class Bdio2UploadResult {
private final HttpUrl uploadUrl;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
* blackduck-common
*
* Copyright (c) 2024 Black Duck Software, Inc.
*
* Use subject to the terms and conditions of the Black Duck Software End User Software License and Maintenance Agreement. All rights reserved worldwide.
*/
package com.blackduck.integration.blackduck.bdio2;

public class RetriableBdioUploadException extends Exception {
}
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
/*
* blackduck-common
*
* Copyright (c) 2024 Synopsys, Inc.
* Copyright (c) 2024 Black Duck Software, Inc.
*
* Use subject to the terms and conditions of the Synopsys End User Software License and Maintenance Agreement. All rights reserved worldwide.
* Use subject to the terms and conditions of the Black Duck Software End User Software License and Maintenance Agreement. All rights reserved worldwide.
*/
package com.synopsys.integration.blackduck.bdio2.model;

import java.util.List;
package com.blackduck.integration.blackduck.bdio2.model;

import com.blackducksoftware.bdio2.BdioMetadata;
import com.blackducksoftware.bdio2.model.Component;
import com.blackducksoftware.bdio2.model.Project;

import java.util.List;

public class Bdio2Document {
private final BdioMetadata bdioMetadata;
private final Project project;
Expand Down
Loading

0 comments on commit 020f43a

Please sign in to comment.