shanbin / scoverage-plugin

Jenkins scoverage plugin for Scala code coverage
https://wiki.jenkins-ci.org/display/JENKINS/Scoverage+Plugin
MIT License
6 stars 19 forks source link

Allow placeholder in reportDir #26

Open franzbecker opened 5 years ago

franzbecker commented 5 years ago

Thanks for the great work!

I've got one issue with the configuration:

Currently I'm using this step to publish the scoverage results:

step([$class: 'ScoveragePublisher', reportDir: 'target/scala-2.12/scoverage-report', reportFile: 'scoverage.xml'])

What I really would want to configure is the following:

reportDir: 'target/scala-*/scoverage-report'

or

reportDir: 'target/**/scoverage-report' 

so that I don't need to update all my configurations when I upgrade the Scala version. When I try this I get errors that the report cannot be found. Looks like this line right here: https://github.com/shanbin/scoverage-plugin/blob/a963910d34694b2debedce2deb234da65c4fc21d/src/main/java/org/jenkinsci/plugins/scoverage/ScoveragePublisher.java#L64

Or did I miss something?