How to get SonarQube to read from multiple repositories?

Viewed 22

I have SQ setup on Jenkins, and the project I’d like to scan now has two separate repositories, and I essentially need the dependencies from both pom.xml’s to successfully scan one API. How can I add a Jenkins step to scan one pom.xml in repo A, then scan pom.xml from repo B, all before it fails.

1 Answers

So in your case, you need repo A to be available since repo B has dependencies generated from repo A?

I guess that if you want two generate two separate scans, you can add a step in your Jenkins Job to clone and scan then the repo. But it's not really clean as you're mixing 2 CI/CD.

Maybe an idea would be to install the POM modules in a shared .m2 repository or something like a Nexus repo, so that all dependencies are shared among projects.

Sorry if this is not clear.

Related