MickeyThreeSheds
MickeyThreeSheds

Reputation: 1016

Gradle, Jacoco, Jenkins - How can I get Jenkins to publish the report?

I have a jave project, which builds using gradle. It runs a jacocoTestReport task, and the report is created during a build. I have a jenkins job which performs the build, and I would like to know how I can get the jenkins job to then publish the coverage report.

I know there is a jacoco maven plugin, etc, but I would assume that since I am using gradle, that is out the window?

I have gotten this far with google, tutorials, etc - but am stuck on this last little hurdle - if anyone can help, that would be amazing.

Thanks in advance.

Upvotes: 1

Views: 5611

Answers (1)

VaL
VaL

Reputation: 1167

  1. Install Jenkins JaCoCo Plugin. It's build-tool-independent and consumes JaCoCo *.exec files

  2. Add and configure post-build action "Record JaCoCo coverage report". Detailed instructions on how to set up coverage retrieval and publishing can be found the official documentation.

Upvotes: 1

Related Questions