Skip to content

scoverage and Parallel Stages in a Jenkins Declarative Pipeline #132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
smrosenberry opened this issue Sep 4, 2023 · 1 comment
Closed

Comments

@smrosenberry
Copy link

smrosenberry commented Sep 4, 2023

I have a multi-module Maven project written in Scala with over 3000 unit tests. To keep build times almost reasonable, those unit tests are run in 6 parallel stages. Complicating matters, I also need scoverage to tell us why we need 4000 unit tests ;)

The build runs first and the 6 parallel test stages after. Problem is I'm only seeing the coverage in SonarQube from the last test stage to complete. The working theory being the last stage wins the race overwriting the scoverage.xml file. I believe my problem is this line in the scoverage.maven.plugin where the file name is hard coded. [EDIT: This line is not the problem! It is simply reporting the location of the scoverage.xml file written by the ScoverageXmlWriter in the line above.]

I tried using the scoverage.xmlOutputDirectory and scoverage.dataDirectory to include the stage name in the value to isolate the scoverage.xml file for each stage in its own directory, but that appears to blow up Maven. Maybe not surprising since both parameters are annotated as read-only.

Am I missing the obvious and if so, what?

@jozic
Copy link
Collaborator

jozic commented Jan 7, 2024

Hi @smrosenberry
seems like it's a duplicate of #83. This is a know limitation - the plugin is not thread-safe.
I've added a note on this in #190.
I will close this one and keep #83 open. Please reopen with more details if you think this one is different

@jozic jozic closed this as not planned Won't fix, can't repro, duplicate, stale Jan 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants