pipeline
pipeline
The OLP CLI provides tools
for managing pipelines.
For examples of pipeline workflows,
see Pipeline workflows.
For more information on pipelines in the platform, see the
Pipeline API.
The OLP CLI supports the following:
- list all visible pipelines
- create a pipeline
- update a pipeline
- show a pipeline
- delete a pipeline
- move a pipeline
pipeline list
Lists all pipelines that you can access.
olp pipeline list [filter] [command options]Optional parameters:
[filter]Freeform text used to filter the pipeline list. The filter checks
if the pipeline's name or description contains thefilterstring.--credentials <path to credentials file>The name of a credentials file to use
with the command. Credentials files are downloaded separately from the platform portal.--profile <profile name>The name of the credentials profile to use from the
olpcli.inifile.--jsonDisplays the command result in JSON format.--quietDisplays pipeline IDs, each on a new line.
For more information on using credentials and profiles, see
Credentials setup.
Example:
The command below lists all the pipelines to which you have access with
the word spark in the name or in the description parameters.
olp pipeline list "spark" --jsonOutput:
{
"pipelines": [
{
"created": "2018-03-01T15:21:11.39Z",
"groupId": "GROUP-9479863e-a13b-4d35-9eb1-5a054669046e",
"name": "sparktestpipeline",
"description": "",
"realm": "org",
"id": "f2fc50c4-a0ac-4c8a-9637-0d9b3a0d4a96",
"updated": "2018-03-01T15:21:11.39Z"
}
]
}pipeline create
Creates a pipeline and associates it with the specified group or project.
olp pipeline create <name> <group ID> [command options]Required parameters:
<name>The name of the pipeline. The length of this parameter
must be between 3 and 64 characters.- Either of the following:
<group ID>The ID of the group whose members are allowed to access the
pipeline.--scope <project HRN>The HRN of the project whose members are allowed to
access the pipeline.
--email <address>A single contact e-mail address for the pipeline.
This email may be used to notify users about various events, such as planned
outages or pipeline restarts, and can help minimize interruption to users'
pipeline operations. We strongly recommend using a distribution list
or group e-mail address rather than a personal email address.
Optional parameters:
--description <pipeline description>The description of the pipeline. The
length of this parameter must be between 0 and 512 characters.--credentials <path to credentials file>The name of a credentials file to use
with the command. Credentials files are downloaded separately from the platform portal.--profile <profile name>The name of the credentials profile to use from the
olpcli.inifile.--jsonDisplays the created pipeline in JSON format.--quietDisplays the pipeline ID.
For more information on using credentials and profiles, see
Credentials setup.
Example:
The command below creates a pipeline with the name My Example Pipeline
and the description This pipeline analyzes data for the specified
group.
olp pipeline create "My Example Pipeline" example-group-id \
--description "This pipeline analyzes data"olp pipeline create "My Example Pipeline" example-group-id ^
--description "This pipeline analyzes data"Output:
Pipeline has been created
ID: f2fc50c4-a0ac-4c8a-9637-0d9b3a0d4a96pipeline update
Updates such properties of the specified pipeline as its name, description, and
an email address for notifications without affecting the pipeline's version.
olp pipeline update <pipeline ID> [command option]Required parameters:
<pipeline ID>The ID of the pipeline to update.
Optional parameters:
--name <pipeline name>A new name for the pipeline.--description <pipeline description>A new description for the pipeline.--email <address>A single contact email address for the pipeline.
This email may be used to notify users about various events, such as planned
outages or pipeline restarts, and can help minimize interruption to users'
pipeline operations. We strongly recommend using a distribution list
or group e-mail address rather than a personal email address.--credentials <path to credentials file>The name of a credentials file to use
with the command. Credentials files are downloaded separately from the platform portal.--profile <profile name>The name of the credentials profile to use from the
olpcli.inifile.--jsonDisplays the pipeline properties in JSON format.--quietDisplays the pipeline ID.--scope <project HRN>Specifies the project HRN to use as the scope in the
request. The value specified with--scopeoverrides any value for
here.token.scopeprovided in the credentials file used for the command.
NoteIf no
--name,--description, or
pipeline properties are kept.
For more information on using credentials and profiles, see
Credentials setup.
Example:
The command below updates the specified pipeline with a new name and
description.
olp pipeline update f2fc50c4-a0ac-4c8a-9637-0d9b3a0d4a96 --name new-name --description new-descriptionOutput:
Pipeline has been updated
ID: f2fc50c4-a0ac-4c8a-9637-0d9b3a0d4a96pipeline show
Shows the properties of the specified pipeline.
olp pipeline show <pipeline ID> [command options]Required parameters:
<pipeline ID>The ID of the pipeline to show.
Optional parameters:
--credentials <path to credentials file>The name of a credentials file to use
with the command. Credentials files are downloaded separately from the platform portal.--profile <profile name>The name of the credentials profile to use from the
olpcli.inifile.--jsonDisplays the pipeline properties in JSON format.--quietDisplays the pipeline name.--scope <project HRN>Specifies the project HRN to use as the scope in the
request. The value specified with--scopeoverrides any value for
here.token.scopeprovided in the credentials file used for the command.
For more information on using credentials and profiles, see
Credentials setup.
Example:
The command below displays the properties of the specified pipeline.
olp pipeline show f2fc50c4-a0ac-4c8a-9637-0d9b3a0d4a96 --jsonOutput:
{
"contactEmail": "[email protected]",
"created": "2018-03-01T15:21:11.39Z",
"groupId": "GROUP-9479863e-a13b-4d35-9eb1-5a054669046e",
"hrn": "hrn:here:pipeline::org:f2fc50c4-a0ac-4c8a-9637-0d9b3a0d4a96",
"name": "sparktestpipeline",
"description": "",
"realm": "org",
"id": "f2fc50c4-a0ac-4c8a-9637-0d9b3a0d4a96",
"updated": "2018-03-01T15:21:11.39Z"
}pipeline delete
Deletes the specified pipeline along with all the versions associated with that
pipeline.
olp pipeline delete <pipeline ID> [command options]
WarningThis command removes the pipeline completely, and there is no way
to restore it.
Required parameters:
<pipeline ID>The ID of the pipeline to delete.
Optional parameters:
--forceCancels and deactivates all versions of the specified
pipeline before deleting the pipeline versions.--credentials <path to credentials file>The name of a credentials file to use
with the command. Credentials files are downloaded separately from the platform portal.--profile <profile name>The name of the credentials profile to use from the
olpcli.inifile.--quietDisplays empty output with no additional information.--scope <project HRN>Specifies the project HRN to use as the scope in the
request. The value specified with--scopeoverrides any value for
here.token.scopeprovided in the credentials file used for the command.
For more information on using credentials and profiles, see
Credentials setup.
Example:
olp pipeline delete f2fc50c4-a0ac-4c8a-9637-0d9b3a0d4a96Output:
Pipeline f2fc50c4-a0ac-4c8a-9637-0d9b3a0d4a96 has been deletedpipeline move
Move the specified pipeline and the pipeline templates associated with the specified number of the most recent versions
of the pipeline to the specified target project.
olp pipeline move <pipeline ID / pipeline HRN> [command options]Required parameters:
<pipeline ID/pipeline HRN>The ID/HRN of the pipeline to move.
Optional parameters:
--target-project <target project HRN>The HRN of the target project.--number-of-versions <number of versions>The number of the most recent versions of the pipeline to include in the
move. The system identifies the pipeline templates associated with these most recent versions of the pipeline for moving
to the specified target project. This number must be between 1 and 5.--reportDisplays migration status details such as source group, target project and other relevant information in case
they are available. Otherwise, displays the migration readiness report.
Please note that this option requires--target-projectand--number-of-versionsto be provided.--revert-to-groupReverts pipeline and template resources to the original group from the project. This option
only applies after a move has successfully completed.--jsonDisplays the command result in JSON format.--credentials <path to credentials file>The name of a credentials file to use
with the command. Credentials files are downloaded separately from the platform portal.--profile <profile name>The name of the credentials profile to use from the
olpcli.inifile.--quietDisplays empty output with no additional information.--scope <project HRN>Specifies the project HRN to use as the scope in the
request. The value specified with--scopeoverrides any value for
here.token.scopeprovided in the credentials file used for the command.
WarningWith the
--reportoption, use a project or a non-project scoped token depending on whether the pipeline is in a group or in a project.
If the pipeline is in a project, the readiness report section is skipped and only last action details are provided.
For more information on using credentials and profiles, see
Credentials setup.
Example:
olp pipeline move f885b263-cc76-4400-a9cc-935e8bd86d7a \
--target-project hrn:here:authorization::org:project/project-example \
--number-of-versions 2
--quietolp pipeline move f885b263-cc76-4400-a9cc-935e8bd86d7a ^
--target-project hrn:here:authorization::org:project/project-example ^
--number-of-versions 2
--quietOutput:
Pipeline f885b263-cc76-4400-a9cc-935e8bd86d7a has been migrated to the hrn:here:authorization::org:project/project-example project