Package io.jenkins.plugins.harbor.client
Class HarborClientImpl
java.lang.Object
io.jenkins.plugins.harbor.client.HarborClientImpl
- All Implemented Interfaces:
HarborClient
-
Constructor Summary
ConstructorsConstructorDescriptionHarborClientImpl(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:HarborClientGet the vulnerabilities addition of the specific artifactGet the vulnerabilities addition of the artifact specified by the reference under the project and repository.
- Specified by:
getVulnerabilitiesAdditionin interfaceHarborClient- Parameters:
projectName- The project name of HarborrepositoryName- The name ofreference- The reference can be digest or tag.
-
getPing
Description copied from interface:HarborClientPing 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:
getPingin interfaceHarborClient- Returns:
- If the request succeeds, the 'Pong' string is returned
- Throws:
IOException- The HTTP request failed
-
listAllRepositories
Description copied from interface:HarborClientList all authorized repositories- Specified by:
listAllRepositoriesin 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:
listArtifactsin interfaceHarborClient- Throws:
HarborExceptionIOException
-
getArtifact
public Artifact getArtifact(String projectName, String repositoryName, String reference, @Nullable Map<String, String> extraParams) throws IOExceptionDescription copied from interface:HarborClientGet the specific artifactGet the artifact specified by the reference under the project and repository. The reference can be digest or tag.
- Specified by:
getArtifactin interfaceHarborClient- Returns:
- Artifact Return artifact information
- Throws:
IOException- The HTTP request failed
-