Package io.jenkins.plugins.harbor.client
Interface HarborClient
- All Known Implementing Classes:
HarborClientImpl
public interface HarborClient
-
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[]
-
Method Details
-
getVulnerabilitiesAddition
NativeReportSummary getVulnerabilitiesAddition(String projectName, String repositoryName, String reference) Get the vulnerabilities addition of the specific artifactGet the vulnerabilities addition of the artifact specified by the reference under the project and repository.
- Parameters:
projectName
- The project name of HarborrepositoryName
- The name ofreference
- The reference can be digest or tag.
-
getPing
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.
- Returns:
- If the request succeeds, the 'Pong' string is returned
- Throws:
IOException
- The HTTP request failedHarborException
- httpUrl is null
-
listAllRepositories
List all authorized repositories- Returns:
- Return to the list of repositories
- Throws:
IOException
-
listArtifacts
Artifact[] listArtifacts(String projectName, String repositoryName, @Nullable Map<String, String> extraParams) throws HarborException, IOException- Throws:
HarborException
IOException
-
getArtifact
Artifact getArtifact(String projectName, String repositoryName, String reference, @Nullable Map<String, String> extraParams) throws IOExceptionGet the specific artifactGet the artifact specified by the reference under the project and repository. The reference can be digest or tag.
- Returns:
- Artifact Return artifact information
- Throws:
IOException
- The HTTP request failedHarborException
- The apiUrl is null in getArtifact method
-