| Summary: | Trigger info doesn't show up for pipeline build if the build is triggered on jenkins | ||
|---|---|---|---|
| Product: | OKD | Reporter: | Yanping Zhang <yanpzhan> |
| Component: | Build | Assignee: | Jimmi Dyson <jdyson> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Wang Haoran <haowang> |
| Severity: | low | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3.x | CC: | aos-bugs, bparees, dyan |
| Target Milestone: | --- | ||
| Target Release: | 3.x | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: |
Cause: Trigger info for pipeline builds was not properly set when the build was triggered by jenkins.
Consequence: It is not clear what triggered the build.
Fix: Trigger info will correctly reflect that jenkins triggered the build.
Result: Trigger info for pipeline builds that were triggered from jenkins will reflect that information.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-05-30 12:51:07 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Yanping Zhang
2016-11-30 09:11:22 UTC
The builds that will get "triggered by jenkins" added are builds that are explicitly launched by the build step from the openshift jenkins plugin. There's probably an argument that builds created through the flow you've described (which really means builds created by the sync plugin) could/should have that indication as well, but it's not part of the currently expected behavior. I'm going to assign this to Jimmi but marking upcoming release as it's definitely not a blocker for 3.4. @bparees Do you think this requires a new `BuildTriggerCause` field or enough to just add a cause with message of `Manually triggered by user in Jenkins` or something? @jimmi there is a TriggeredBy field on build objects today, here's how we populate it for builds that were triggered by a step in a jenkins job:
triggeredBy:
- message: 'Jenkins job URI: https://jenkins-myproject.10.13.137.191.xip.io/job/asdf/1/'
Now that's a bit different from this scenario which is the case where the sync plugin is creating the build because the user requested to run a pipeline job in jenkins (or perhaps because the job definition in jenkins was triggered by something else), it probably makes sense for it to just say something like:
triggeredBy:
- message: 'Corresponding Jenkins job was run'
And if you want to know exactly why the correspodning jenkins job was run, you'd have to go look at the job URI (which is already annotated on the build object, as i recall) and see who/what started the job.
Does that seem reasonable?
Fixed in sync plugin v0.1.6. @bparees Shall I assign to @tdawson when it's synced? Assume you're OK to get this in to 3.4 as it's such a tiny update? Honestly i'd rather just wait for 3.4.1 to produce a new image since QE just finished regression testing on the jenkins image and i don't want to rock the boat. So it should still get assigned to Troy but the message to Troy is to not worry about packaging this plugin+rebuilding the image for 3.4. @tdawson Over to you for packaging - no hurry as @bparees explained above, this is for 3.4.1. rpm updated: jenkins-plugin-openshift-sync-0.1.7-1.el7 images made: openshift3/jenkins-1-rhel7:1.651.2-47 openshift3/jenkins-2-rhel7:2.19-14 rpm is in the 3.4 testing repos images are in the testing registries. Troy, when you build the new 3.4 jenkins image, what changes did you pick up? I'm hoping you only changed the sync plugin... Checked on OCP 3.4.1.0:
jenkins-plugin-openshift-sync-0.1.7-1.el7.x86_64
registry.ops.openshift.com/openshift3/jenkins-2-rhel7 <none> 5119d00f1c73 12 hours ago 678.8 MB
Now there is trigger info when pipeline is triggered by jenkins:
Triggered By:
Triggered by Jenkins job at https://jenkins-prozyp.0120-5mz.qe.rhcloud.com/job/prozyp-sample-pipeline/
The bug has been fixed, so move it to Verified.
|