<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Nov 27, 2015 at 9:20 PM, David Caro Estevez <span dir="ltr"><<a href="mailto:dcaro@redhat.com" target="_blank">dcaro@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">On 11/27 20:57, Nir Soffer wrote:<br>
> Todo:<br>
><br>
> - Easy way to access the report from gerrit<br>
> It should be easy to add a link the coverage report in the comment added<br>
> by jenkins after a build finish.<br>
<br>
</span>Not really, the gerrit comments that jenkins sends can't be changed by the<br>
build, that means that you can't put put there a non-static url.<br>
There's a quite tricky way that can be done with groovy postscripts and<br>
accessing the jenkins inner objects, but that's very likely to break on any<br>
plugin upgrade and requires a bit of investigating with objects to change.<br></blockquote><div><br></div><div>The url for the coverage report is the build url we see in gerrit + '<a href="http://jenkins.ovirt.org/job/vdsm_master_check-patch-fc23-x86_64/648/artifact/exported-artifacts/htmlcov/index.html" rel="noreferrer" target="_blank">/artifact/exported-artifacts/htmlcov/index.html</a>'</div><div><br></div><div>Maybe this can be added by a gerrit plugin?</div><div><br></div><div>Another option - can we add nice "coverage" link to jenkins build page? </div><div><br></div><div>One click on the build link from gerrit, and another on the build page is better then typing </div><div>the url manually.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">> - The report is using absolute paths, but we like shorter relative paths.<br>
><br>
> I don't see a way to configure nosetests or coverage to generate<br>
> relative paths.<br>
> May need hacking of the generated html/json in htmlcov.<br>
<br>
</span>If you find it please tell me, I have the same issue with other projects, I'll<br>
do if I discover a way :)<br></blockquote><div><br></div><div>I found this json, which looks like something that can be easily hack:</div><div><a href="http://jenkins.ovirt.org/job/vdsm_master_check-patch-fc23-x86_64/665/artifact/exported-artifacts/htmlcov/status.json">http://jenkins.ovirt.org/job/vdsm_master_check-patch-fc23-x86_64/665/artifact/exported-artifacts/htmlcov/status.json</a><br></div><div><br></div><div>I did not try, but maybe modifying "relative_filename" will do the trick.</div><div><br></div><div>We can wrap coverage with our own script creating a report and cleaning it up.</div><div><br></div><div>Nir</div></div></div></div>