Skip to content

Commit

Permalink
feat(sdk): Added optional argument to specify description for pipelin…
Browse files Browse the repository at this point in the history
…e upload (#4577)
  • Loading branch information
shaikmanu797 authored Oct 7, 2020
1 parent a840ce7 commit dd1e3d8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions sdk/python/kfp/cli/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,21 @@ def pipeline():
"--pipeline-name",
help="Name of the pipeline."
)
@click.option(
"-d",
"--description",
help="Description for the pipeline."
)
@click.argument("package-file")
@click.pass_context
def upload(ctx, pipeline_name, package_file):
def upload(ctx, pipeline_name, package_file, description=None):
"""Upload a KFP pipeline"""
client = ctx.obj["client"]
output_format = ctx.obj["output"]
if not pipeline_name:
pipeline_name = package_file.split(".")[0]

pipeline = client.upload_pipeline(package_file, pipeline_name)
pipeline = client.upload_pipeline(package_file, pipeline_name, description)
_display_pipeline(pipeline, output_format)


Expand Down

0 comments on commit dd1e3d8

Please sign in to comment.