-
Notifications
You must be signed in to change notification settings - Fork 88
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
Support trigger a parameterized Pipeline in PipelineRun reconciler #210
Support trigger a parameterized Pipeline in PipelineRun reconciler #210
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: JohnNiang The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
One more checklist item might be: |
Codecov Report
@@ Coverage Diff @@
## master #210 +/- ##
=========================================
+ Coverage 5.56% 5.59% +0.02%
=========================================
Files 79 79
Lines 21383 21392 +9
=========================================
+ Hits 1190 1196 +6
- Misses 20120 20123 +3
Partials 73 73
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
hi @JohnNiang , could you provide an image for this PR? |
Of course. Please test with docker image: |
@@ -127,7 +127,7 @@ func (r *Reconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) { | |||
} | |||
|
|||
// first run | |||
pipelineBuild, err := r.triggerJenkinsJob(devopsProjectName, pipelineName) | |||
pipelineBuild, err := r.triggerJenkinsJob(devopsProjectName, pipelineName, &pr.Spec) | |||
if err != nil { |
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 consider adding a condition for this case.
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.
You mean, if an error is returned, add a condition into status.conditions, is that right?
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.
Yes
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.
I think we can skip this error handling since the handling won't block this PR. And I'll fire another PR to handle it. What do you reckon?
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.
OK.
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.
/lgtm
What this PR dose
Make parameters in PipelineRunSpec available.
Why we need it
This PR is part of #41
Special notes
Upstream PR: jenkins-zh/jenkins-client#14
TODO
/kind feature