Publish Coverage from JaCoCo using the new Coverage API:
https://jenkins.io/blog/2018/08/17/code-coverage-api-plugin-1/

It makes a statement in this blog:

> publishCoverage adapters: [jacocoAdapter('target/site/jacoco/jacoco.xml')]
> You can also use jacoco instead of jacocoAdapter if you didn't install 
> Jacoco-Plugin.


What does this mean? That I could use the jacoco pipeline within 
publishCoverage:
jacoco classPattern: 'build/classes', execPattern: 'build/jacoco/*.exec'

In order to use the JaCoCo Adapter, I would need to run jacoco to generate 
the test report as part of my build with Gradle.
./gradlew jacocoTestReport

Then use the output from it in publishCoverage:
publishCoverage adapters: [jacocoAdapter(
'build/reports/jacoco/test/jacocoTestReport.xml')]

But if the implication of the statement made in the blog is what I think it 
means, I would not need to run jacocoTestReport.
However the Snippet generator does not allow for it, so I am not sure.


-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/67662343-72e7-4c65-9e51-833bab959a71%40googlegroups.com.

Reply via email to