My organization has multiple pipelines in a monorepo that we tried consolidating into one project in SonarQube to save some LOC. However, each time I would set one pipeline to run under the same project name, it would overwrite the previous scan from the other pipeline that ran with the same sonar project name. Is there a configuration setting to be able to do set pipelines to the same project name without overwriting previous scans? I want it to be able to simply add code coverage from one pipeline to the scan from the other pipeline.
Itβs not possible to enrich an analysis with data from a separate scan (like adding code coverage after the fact). All the data needs to be there when the scan is submitted.
Hey Colin,
Thanks for the response. Maybe this question belongs in another thread, but what is the best way to handle mono-repos that contain multiple pipelines? We are getting a lot of duplication eating up LOC. We could create more detailed exclusions for each pipeline but that would require a massive sonar.exclusions argument for every single pipeline file. Is there a more efficient way to narrow the focus?
By setting sonar.sources=app1 or sonar.inclusions=app1/**/*, you would automatically limit the files included. The documentation on Narrowing the focus with analysis scope is helpful here.