Github Actions Matrix Jobs & Sonarqube

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    SonarQube
  • how is SonarQube deployed: zip, Docker, Helm
    Github Action
  • what are you trying to achieve
    If I have one gradle project have three sub-modules:
  1. submodule-A
  2. submodule-B
  3. submodule-C
    And I start three Github Actions Job to run them separately(It’s one Job run one sub module).
    Then how can I run the Sonarqube?
  • what have you tried so far to achieve this
    Upload/Download Artifact

Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!

Hi,

Generally it’s one project, and thus one analysis, per build. Since you have 3 different jobs for three different sub-projects, I’d simply add the analysis to each of the jobs. And make sure you specify a unique sonar.projectKey for each! :slight_smile:

 
HTH,
Ann

Let me clarify, I have a project have three gradle sub modules.
And I have a Github Actions Matrix Job.
The Matrix Job generates three sub-Jobs, each Job run Unit Test for one sub gradle module.
And I only have a project key.

Hi,

That doesn’t change my answer. If you’ve got 3 different builds, that’s 3 different analyses, each with a unique project key.

 
HTH,
Ann