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/.
|
--clean-job-runs ( ) |
Delete job runs along with
artifacts.
|
--cpd-scope |
The IBM Software Hub space,
project, or catalog scope. For example,
cpd://default-context/spaces/7bccdda4-9752-4f37-868e-891de6c48135.
|
--limit |
Specify the total number of
resources.
|
--output-file |
Specify the file path to
where the identifiers of pipelines, jobs, and job runs are saved after the artifacts are
deleted.
|
--project-id |
Specify an IBM Software Hub
project instance.
|
--retention-time |
All the artifacts older than the
specified retention period are deleted. Retention time is defined as time now - job run creation
date.
|
--space-id |
Specify a space
identifier.
|