-
Notifications
You must be signed in to change notification settings - Fork 17
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
Make PipelineRun support parameterized trigger #187
Make PipelineRun support parameterized trigger #187
Conversation
/kind feature |
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.
Please check the following erorrs:
➜ bin git:(feat/pipelinerun-with-param) ./ks pip create
? Please select workspace name: test
? Please select project name: test
? Please select : simple
? Please input the Pipeline name ridgemoor
➜ bin git:(feat/pipelinerun-with-param) ./ks pip run
? Please select workspace name: test
? Please select project name: testlrjmw
? Please select pipeline name: ridgemoor
Usage:
ks pipeline run [flags]
Flags:
-b, --batch Run pipeline as batch mode
-h, --help help for run
-n, --namespace string The namespace of target Pipeline
-P, --parameters stringToString The parameters that you want to pass, example of single parameter: name=value (default [])
-p, --pipeline string The Pipeline name that you want to run
failed create PipelineRun, error: PipelineRun.devops.kubesphere.io "ridgemoor6wpkt" is invalid: spec.parameters: Invalid value: "null": spec.parameters in body must be of type array: "null"
I guess that you forget to take care of those Pipelines which does not have parameters.
hi @LinuxSuRen , I've noticed the issue. If the problem is empty, there will be a problem. Refer to the BlueOcean RESTful API. |
I didn't get your point. |
My bad. Please see below: I've noticed the issue. If the parameters are empty, there will be a problem. Refer to the BlueOcean RESTful API. |
So, how to fix that problem? Not intend to fix it? |
Currently, we have to pass at least one parameters explicitly. |
Must pass a parameter even if there are no parameters in a Pipeline? I don't think this is acceptable. This is a breaking change. |
Agree. I've resolved the breaking change. Please have a look at it. |
f2397fc
to
c47db95
Compare
c47db95
to
f2397fc
Compare
Fix wrong format of PipelineRun template Fix unquoted error of parameter value Refine parameter flag Remove unused parameter type Add some tests against PipelineRun template parsing Remove unused method
f2397fc
to
1c0c0bd
Compare
Codecov Report
@@ Coverage Diff @@
## master #187 +/- ##
========================================
Coverage ? 8.84%
========================================
Files ? 32
Lines ? 1311
Branches ? 0
========================================
Hits ? 116
Misses ? 1185
Partials ? 10
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
What this PR dose
Make PipelineRun support parameterized trigger.
Why we need it
For now, we can use this feature to test against kubesphere/ks-devops#210. In the future, we can trigger a parameterized Pipeline conveniently using this CLI.
How to use it