-
Notifications
You must be signed in to change notification settings - Fork 166
WIP: Document pipelines as code #1770
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
Conversation
Includes instructions for using pipelines as code to build and deploy a function on the cluster. Signed-off-by: Lance Ball <lball@redhat.com>
Signed-off-by: Lance Ball <lball@redhat.com>
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lance 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 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1770 +/- ##
==========================================
+ Coverage 62.04% 62.24% +0.19%
==========================================
Files 100 100
Lines 13311 13311
==========================================
+ Hits 8259 8285 +26
+ Misses 4253 4230 -23
+ Partials 799 796 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
| 4. Configure the function to enable on cluster builds for the Git repository: | ||
| ```yaml | ||
| build: git # required, specify `git` build type | ||
| func config git set |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor nit just to match other commands
| func config git set | |
| kn func config git set |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be wort to add a link down below to ## Building a Function on the Cluster with Pipelines as Code if PAC is used with a details.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I would move this step 4. (and git push) directly to ## Building a Function on the Cluster with Pipelines as Code section. It is confusing atm.
And then add another note on adding the git url manually in ## Building and Deploying a Function on Cluster Using the CLI - when this approach is used.
| The `func` CLI can generate the Tekton resources for you, adding them to a `.tekton` directory in your project. Commit these files to your project and use them to build your function on the cluster. | ||
| 1. When you ran `func config git set` earlier, this command also generated a `.tekton/pipeline.yaml` and a `.tekton/pipeline-run.yaml` file in your project directory. If you have not run this command, run it now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey Lance.. just a sugestion.. what about add a note that the user needs to make sure to include Webhook? and for that he needs handy a valid GitHub token with write permission to Webhooks.
kn func config git set
...
? Do you want to configure webhook trigger? Yes
? Please enter the GitHub Personal Access Token:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, adding more details is good. We can mention that this command creates resources on the cluster (PVC, Secrets with credentials), local resources (Tekton templates, that can be edited by users) and also resources on the remote git platform (GitHub & incoming GitLab support). For that users need to provide info:
- GitHub GitHub Personal Access Token. For public repositories the scope is 'public_repo', for private is 'repo', then user needs to create the Webhook on GH side on his own. If you want to configure the webhook automatically, 'admin:repo_hook' is needed as well. Get more details: https://pipelines-as-code.pages.dev/docs/install/github_webhook/.
- Similar stuff for GitLab - once the PR is merged
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be also nice to print example output, that you can see if you run kn func config git set.
zroubalik
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good!
| The `func` CLI can generate the Tekton resources for you, adding them to a `.tekton` directory in your project. Commit these files to your project and use them to build your function on the cluster. | ||
| 1. When you ran `func config git set` earlier, this command also generated a `.tekton/pipeline.yaml` and a `.tekton/pipeline-run.yaml` file in your project directory. If you have not run this command, run it now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, adding more details is good. We can mention that this command creates resources on the cluster (PVC, Secrets with credentials), local resources (Tekton templates, that can be edited by users) and also resources on the remote git platform (GitHub & incoming GitLab support). For that users need to provide info:
- GitHub GitHub Personal Access Token. For public repositories the scope is 'public_repo', for private is 'repo', then user needs to create the Webhook on GH side on his own. If you want to configure the webhook automatically, 'admin:repo_hook' is needed as well. Get more details: https://pipelines-as-code.pages.dev/docs/install/github_webhook/.
- Similar stuff for GitLab - once the PR is merged
| 4. Configure the function to enable on cluster builds for the Git repository: | ||
| ```yaml | ||
| build: git # required, specify `git` build type | ||
| func config git set |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be wort to add a link down below to ## Building a Function on the Cluster with Pipelines as Code if PAC is used with a details.
| The `func` CLI can generate the Tekton resources for you, adding them to a `.tekton` directory in your project. Commit these files to your project and use them to build your function on the cluster. | ||
| 1. When you ran `func config git set` earlier, this command also generated a `.tekton/pipeline.yaml` and a `.tekton/pipeline-run.yaml` file in your project directory. If you have not run this command, run it now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be also nice to print example output, that you can see if you run kn func config git set.
| 4. Configure the function to enable on cluster builds for the Git repository: | ||
| ```yaml | ||
| build: git # required, specify `git` build type | ||
| func config git set |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I would move this step 4. (and git push) directly to ## Building a Function on the Cluster with Pipelines as Code section. It is confusing atm.
And then add another note on adding the git url manually in ## Building and Deploying a Function on Cluster Using the CLI - when this approach is used.
|
PR needs rebase. 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. |
|
/override Func Build / Build (1.18.x, ubuntu-latest) |
|
@matejvasek: matejvasek unauthorized: /override is restricted to Repo administrators. In response to this:
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. |
|
This Pull Request is stale because it has been open for 90 days with |
|
This Pull Request is stale because it has been open for 90 days with |
|
This Pull Request is stale because it has been open for 90 days with |
This is a work in progress to document the process for using pipelines as code with a function.