Package io.jenkins.plugins.harbor.client
Class HarborClientImpl
java.lang.Object
io.jenkins.plugins.harbor.client.HarborClientImpl
- All Implemented Interfaces:
HarborClient
-
Constructor Summary
ConstructorDescriptionHarborClientImpl
(String baseUrl, com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials credentials, boolean isSkipTlsVerify, boolean debugLogging) -
Method Summary
Modifier and TypeMethodDescriptiongetArtifact
(String projectName, String repositoryName, String reference, Map<String, String> extraParams) Get the specific artifactgetPing()
Ping Harbor to check if it's alive.getVulnerabilitiesAddition
(String projectName, String repositoryName, String reference) Get the vulnerabilities addition of the specific artifactList all authorized repositoriesArtifact[]
-
Constructor Details
-
HarborClientImpl
public HarborClientImpl(String baseUrl, com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials credentials, boolean isSkipTlsVerify, boolean debugLogging) throws NoSuchAlgorithmException, KeyManagementException
-
-
Method Details
-
getVulnerabilitiesAddition
public NativeReportSummary getVulnerabilitiesAddition(String projectName, String repositoryName, String reference) Description copied from interface:HarborClient
Get the vulnerabilities addition of the specific artifactGet the vulnerabilities addition of the artifact specified by the reference under the project and repository.
- Specified by:
getVulnerabilitiesAddition
in interfaceHarborClient
- Parameters:
projectName
- The project name of HarborrepositoryName
- The name ofreference
- The reference can be digest or tag.
-
getPing
Description copied from interface:HarborClient
Ping Harbor to check if it's alive.This API simply replies a pong to indicate the process to handle API is up, disregarding the health status of dependent components.
- Specified by:
getPing
in interfaceHarborClient
- Returns:
- If the request succeeds, the 'Pong' string is returned
- Throws:
IOException
- The HTTP request failed
-
listAllRepositories
Description copied from interface:HarborClient
List all authorized repositories- Specified by:
listAllRepositories
in interfaceHarborClient
- Returns:
- Return to the list of repositories
- Throws:
IOException
-
listArtifacts
public Artifact[] listArtifacts(String projectName, String repositoryName, @Nullable Map<String, String> extraParams) throws HarborException, IOException- Specified by:
listArtifacts
in interfaceHarborClient
- Throws:
HarborException
IOException
-
getArtifact
public Artifact getArtifact(String projectName, String repositoryName, String reference, @Nullable Map<String, String> extraParams) throws IOExceptionDescription copied from interface:HarborClient
Get the specific artifactGet the artifact specified by the reference under the project and repository. The reference can be digest or tag.
- Specified by:
getArtifact
in interfaceHarborClient
- Returns:
- Artifact Return artifact information
- Throws:
IOException
- The HTTP request failed
-