pipeline cleanup delete-artifacts

Deletes artifact files that are created by Orchestration Pipelines job runs. Only files from job runs that started before a specific point in time are deleted. Identifiers of jobs and runs whose artifacts are deleted are preserved in the output file. The number of job runs can be limited by using the --limit option. Artifacts can be deleted directly from a mounted file system by using the --assets-dir-path option.

Syntax

cpd-cli pipeline cleanup
delete-artifacts \
--output-file=<output-file-location> \
--retention-time=<placeholder-text> \
[--asset-dir-path=<resource-reference>] \
[--clean-job-runs=<placeholder>] \
[--cpd-scope=<cpd-scope>] \
[--limit=<resource-limit>] \
[--project-id=<project-id>] \
[--space-id=<space-identifier>]

Options

Table 1: Command options
Option Description
--asset-dir-path Specify the path to the mounted assets directory. For example, /mnt/asset_file_api/projects/{project-id}/assets/.
Status
Optional.
Syntax
--asset-dir-path=<resource-reference>
Default value
No default.
--clean-job-runs ( ) Delete job runs along with artifacts.
Status
Optional.
Syntax
--clean-job-runs=<placeholder>
Default value
No default.
--cpd-scope The IBM Software Hub space, project, or catalog scope. For example, cpd://default-context/spaces/7bccdda4-9752-4f37-868e-891de6c48135.
Status
Optional.
Syntax
--cpd-scope=<cpd-scope>
Default value
No default.
--limit Specify the total number of resources.
Status
Optional.
Syntax
--limit=<resource-limit>
Default value
100
Input type
int64
--output-file Specify the file path to where the identifiers of pipelines, jobs, and job runs are saved after the artifacts are deleted.
Status
Required.
Syntax
--output-file=<output-file-location>
Default value
No default.
Input type
string
--project-id Specify an IBM Software Hub project instance.
Status
Optional.
Syntax
--project-id=<project-id>
Default value
No default.
Input type
string
Valid values
A valid project identifier.
--retention-time All the artifacts older than the specified retention period are deleted. Retention time is defined as time now - job run creation date.
Status
Required.
Syntax
--retention-time=<placeholder-text>
Default value
-1
Input type
string
--space-id Specify a space identifier.
Status
Optional.
Syntax
--space-id=<space-identifier>
Default value
No default.
Input type
string