It simply means that you can use the symboled `jacoco` in your pipeline if you do not have the jacoco-plugin installed. Otherwise you need to use the name `jacocoAdapter` (both symbols refer to the same thing). Since the jacoco plugin also provides a step with the symbol `jacoco` your pipeline will have a syntax error (name clash) because you use a symbol that is located in multiple plugins. To be on the save side: always use jacocoAdapter.
> Am 06.03.2020 um 09:52 schrieb Sverre Moe <[email protected]>: > > 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] > <mailto:[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 > > <https://groups.google.com/d/msgid/jenkinsci-users/67662343-72e7-4c65-9e51-833bab959a71%40googlegroups.com?utm_medium=email&utm_source=footer>. -- 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/6D414CE2-C5CB-45E5-8AA0-0E70BDED356B%40gmail.com.
