Check failure on line 1 in .github

I’m attempting to integrate sonarcloud into my github repos via git action. This is a java/maven driven project. I’ve updated my pom.xml with the required properties:

<sonar.projectKey>
<sonar.organization>
<sonar.host.url>

and create a .github/workflows/sonarcloud.yml as provided by the sonarcloud website. When the code runs, it exits with:

check failure on line 1 in .github (https://github.com/cBioPortal/cbioportal/actions/runs/271077599)

Any suggestions for solving this would be greatly appreciated.

Hi @n1zea144 and welcome to the community !

THe only error i see from your log is this one :

Failed to execute goal on project persistence-api: Could not resolve dependencies for project org.mskcc.cbio:persistence-api:jar:3.4.13-7-ga4aa6936c-SNAPSHOT: Could not find artifact org.mskcc.cbio:model:jar:3.4.13-7-ga4aa6936c-SNAPSHOT

Is that relevant ?

Mickaël

Hi Mickaël,

Thanks for the reply and for pointing this out. Yes, this seems relevant. Let me dig further.

Best,
Benjamin

Hi Mickaël,

I’ve gotten further by modifying the maven run command in my .yml file to actually build the code in addition to running sonar “verify” step. I’m now running into the following error in the sonarcloud log:

Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar (default-cli) on project master: Project ‘cBioPortal_cbioportal’ can’t have 2 modules with the following key: cBioPortal_cbioportal -> [Help 1]

I’ve put the required maven - sonar properties in my top level pom.xml. Do they belong someplace else?

Thanks for your time and attention to this matter.

-Benjamin

The best i think would be to specify the sonar.projectKey in each module’s pom.xml, so that everyone can be identified separately.

You can find more information here : https://docs.sonarqube.org/latest/analysis/scan/sonarscanner-for-maven/

I did some googling and it looks like using the following maven tag in my top level pom addresses this:

<sonar.moduleKey>{project.groupId}:{project.artifactId}</sonar.moduleKey>

The workflow is running to completion after I added this.