Skip to content

artifact

artifact accessories

artifact accessories <ARTIFACT>

Get accessories for an artifact.

Arguments

ARTIFACT
Name of the artifact in the format 'PROJECT/REPOSITORY{:tag,@sha256:digest}'. Example: 'library/nginx:latest' or 'library/nginx@sha256:1234'.
Type: text
Required:


artifact buildhistory

artifact buildhistory <ARTIFACT>

Get the build history of an artifact.

Arguments

ARTIFACT
Name of the artifact in the format 'PROJECT/REPOSITORY{:tag,@sha256:digest}'. Example: 'library/nginx:latest' or 'library/nginx@sha256:1234'.
Type: text
Required:


artifact clean

artifact clean [OPTIONS]

Bulk delete artifacts that match one or more conditions.

Options

--project <PROJECT,[PROJECT...]>
Project(s) to delete artifacts from. If not specified, all projects will be considered.
Separate multiple values with commas, or use --project multiple times.
Type: text

--repo <REPOSITORY,[REPOSITORY...]>
Repository name(s) to delete artifacts from. If not specified, all repositories in the matched project(s) will be considered.
Separate multiple values with commas, or use --repo multiple times.
Type: text

--age <AGE>
CRITERIA: Delete artifacts older than the specified number of days.
Type: integer

--severity <SEVERITY>
CRITERIA: Delete all artifacts with the given severity or higher.
Type: choice
Choices: Unknown, Negligible, Low, Medium, High, Critical, None

--operator <OPERATOR>
Operator to use when matching multiple criteria.
Type: choice
Choices: and, or, xor
Default: and

--except-project <EXCEPT_PROJECT>
Regex pattern for excluding artifacts from projects.
Type: text

--except-repo <EXCEPT_REPO>
Regex pattern for excluding artifacts from repositories.
Type: text

--except-tag <EXCEPT_TAG>
Regex pattern for artifacts with tags to exclude from deletion.
Type: text

--max <MAX_COUNT>
Abort deletion if this number of artifacts would be deleted.
Type: integer

--dryrun
Show which artifacts would be deleted, but don't do anything.
Type: boolean (flag)
Default: False

--force
Force deletion without confirmation.
Type: boolean (flag)
Default: False

--exit-on-error
Abort the operation and exit with non-zero exit code if an artifact cannot be deleted.
Type: boolean (flag)
Default: False


artifact copy

artifact copy <ARTIFACT> <PROJECT> <REPOSITORY>

Copy an artifact to a different repository.

Arguments

ARTIFACT
Name of the artifact in the format 'PROJECT/REPOSITORY{:tag,@sha256:digest}'. Example: 'library/nginx:latest' or 'library/nginx@sha256:1234'.
Type: text
Required:

PROJECT
Destination project.
Type: text
Required:

REPOSITORY
Destination repository (without project name).
Type: text
Required:


artifact delete

artifact delete <ARTIFACT> [OPTIONS]

Delete an artifact.

Arguments

ARTIFACT
Name of the artifact in the format 'PROJECT/REPOSITORY{:tag,@sha256:digest}'. Example: 'library/nginx:latest' or 'library/nginx@sha256:1234'.
Type: text
Required:

Options

--force
Force deletion without confirmation.
Type: boolean (flag)
Default: False


artifact get

artifact get <ARTIFACT> [OPTIONS]

Get information about a specific artifact.

Arguments

ARTIFACT
Name of the artifact in the format 'PROJECT/REPOSITORY{:tag,@sha256:digest}'. Example: 'library/nginx:latest' or 'library/nginx@sha256:1234'.
Type: text
Required:

Options

--with-vuln, -v
Include vulnerability report in output.
Type: boolean (flag)
Default: False

--with-vuln-desc, -d
Include descriptions of each vulnerability in the output.
Type: boolean (flag)
Default: False


artifact list

artifact list [OPTIONS]

List artifacts in one or more projects and/or repositories.

Options

--project <PROJECT,[PROJECT...]>
Project name(s). (e.g. 'library').
Separate multiple values with commas, or use --project multiple times.
Type: text
Default: []

--repo <REPO,[REPO...]>
Repository name(s).(e.g. 'hello-world').
Separate multiple values with commas, or use --repo multiple times.
Type: text
Default: []

--query <QUERY>
Query parameters to filter the results.
See harborapi docs for more information.
Type: text

--tag <TAG,[TAG...]>
Limit to artifacts with tag(s) (e.g. 'latest').
Separate multiple values with commas, or use --tag multiple times.
Type: text
Default: []

--arch <ARCH,[ARCH...]>
Limit to artifacts with architecture(s) (e.g. 'amd64,arm64').
Separate multiple values with commas, or use --arch multiple times.
Type: text
Default: []

--os <OS,[OS...]>
Limit to artifacts with OS(es) (e.g. 'linux,freebsd').
Separate multiple values with commas, or use --os multiple times.
Type: text
Default: []

--with-report
Include vulnerability report in output.
Type: boolean (flag)
Default: False

--max-connections <MAX_CONNECTIONS>
Maximum number of concurrent connections to use. Setting this too high can lead to severe performance degradation.
Type: integer
Default: 5