Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Sample] CI Sample: helloworld #2833

Merged
merged 5 commits into from Feb 6, 2020

Conversation

dldaisy
Copy link
Contributor

@dldaisy dldaisy commented Jan 13, 2020

#1 piece for CI samples:
<To make the repo more easily reviewable, pr 2784(#2784) will be broken into smaller prs>
This sample is the simplest helloworld sample for versioned pipeline CI.

  • Use cloudbuild for CI process
  • Use curl(REST API) to interact with kfp server

This change is Reviewable

@k8s-ci-robot
Copy link
Contributor

Hi @dldaisy. Thanks for your PR.

I'm waiting for a kubeflow member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@numerology
Copy link

/ok-to-test

_NAMESPACE: kubeflow
_PIPELINE_ID: [Your kubeflow pipeline id to create a version on. Get it from kfp UI.]
_GS_BUCKET: [Name of your cloud storage bucket. For example, 'gs://my-bucket']
_PIPELINE_ENDPOINT: [Your exposed pipeline endpoint.]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe give an example here, like: 12345678-dot-us-west1.notebooks.googleusercontent.com

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok. done with giving a more detailed example.


# strip gs:// prefix
bucket_name=$(echo $3 | sed 's/gs:\/\///')
data='{"name":'\""ci-$1"\"', "code_source_url": "https://github.com/kubeflow/pipelines/tree/'"$1"'", "package_url": {"pipeline_url": "https://storage.googleapis.com/'"$bucket_name"'/'"$1"'/pipeline.zip"},

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry maybe a silly question. Should the code_source_url point to the user's repo or KFP's repo?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code_source_url should points to the user's github repo, as part of source code management. Currently it only acts as a reminder, thus leaving it empty would also work for an example.


## Overview

This sample uses cloudbuild to implement the continuous integration process of a simple pipeline that outputs "hello world" to the console. Once all set up, you can push your code to github repo, then the build process in cloud build will be triggered automatically, then a run will be created in kubeflow pipeline. You can view your pipeline and the run in kubeflow pipelines.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe use "Cloud Build" instead of cloud build? Sort of a brand name?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for "Kubeflow Pipelines"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, will do.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gentle bump

_GCR_PATH: [Your cloud registry path. For example, gcr.io/myproject]
_CODE_PATH: /workspace/hello-world
_NAMESPACE: kubeflow
_PIPELINE_ID: [Your kubeflow pipeline id to create a version on. Get it from kfp UI.]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kfp -> Kubeflow Pipelines

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gentle bump

@dldaisy
Copy link
Contributor Author

dldaisy commented Jan 16, 2020

/retest


substitutions:
_GCR_PATH: [Your cloud registry path. For example, gcr.io/myproject]
_CODE_PATH: /workspace/hello-world
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you double check this _CODE_PATH? Should it be something like /workspace/samples/contrib/....

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes! it should!

@jingzhang36
Copy link
Contributor

/lgtm

@jingzhang36
Copy link
Contributor

@dldaisy is it ready to merge this PR?

@dldaisy
Copy link
Contributor Author

dldaisy commented Feb 5, 2020

@jingzhang36 yes, I think this PR looks good.

@jingzhang36
Copy link
Contributor

/approve

1 similar comment
@jingzhang36
Copy link
Contributor

/approve

@numerology
Copy link

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jingzhang36, numerology

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@numerology
Copy link

Thanks! @dldaisy

@jingzhang36
Copy link
Contributor

/test kubeflow-pipeline-e2e-test

@numerology
Copy link

/retest

@jingzhang36
Copy link
Contributor

/test kubeflow-pipeline-sample-test

@k8s-ci-robot k8s-ci-robot merged commit c125c52 into kubeflow:master Feb 6, 2020
Jeffwan pushed a commit to Jeffwan/pipelines that referenced this pull request Dec 9, 2020
* samples/contrib/versioned-pipeline-ci-samples/helloworld-ci-sample/README.md

* hello world sample

* more detailed help

* use component.yaml instead of ContainerOp

* code path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants