Right now, from Gerrit, you have to click the link to the console output of the code health Jenkins job, then scroll through 50 pages of useless console output, then down at the very bottom you can click on the link to the actual report in SonarQube. Is there any way that we could link to the SonarQube report directly from Gerrit?
Description
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Output link to SonarQube dashboard for success/failure on patch | integration/config | master | +4 -0 |
Event Timeline
We can tweak the URL for success and failures, there are plenty of examples in zuul/layout.yaml. That is done by adding a job rule and then setting success-pattern / failure-pattern. Example to force the full console output:
- name: mediawiki-fresnel-patch-docker branch: master # Point to full output instead of default (tail-trimmed) output. # This is (oddly) to make the output visually shorter. # The reason the full output will be visually shorter is because nothing # will be partially cut off, and thus the collapsible sections work. # # Without this, you land in the middle of 100s of lines of unintersting output. # # With this, you land at collapsed sections, with right after that "Fresnel result" # # Format isn't documented AFAIK, but its code is here: # https://github.com/wikimedia/integration-zuul/blob/6ca76c5f84/zuul/model.py#L733-L753 success-pattern: 'https://integration.wikimedia.org/ci/job/{job.name}/{build.number}/consoleFull' failure-pattern: 'https://integration.wikimedia.org/ci/job/{job.name}/{build.number}/consoleFull'
Change 510686 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[integration/config@master] wip: Output link to SonarQube dashboard for success/failure
Change 510686 merged by jenkins-bot:
[integration/config@master] Output link to SonarQube dashboard for success/failure on patch
Thanks for the nudge on this @kaldari, @hashar and I were able to get it working with https://gerrit.wikimedia.org/r/c/integration/config/+/512379
I've updated the blog post. You can see an example link directly to SonarQube here https://gerrit.wikimedia.org/r/c/mediawiki/extensions/GrowthExperiments/+/511333#message-21a009ab4c023850e46cfe46d580e0b6251da28d