GitLab + SonarCloud Java

How does SonarCloud integration with GitLab CI / Runners works for maven projects.
Is there any equivalent bitbucket pipe that allows to scan and run the quality gate.
or
we have to go with the below command.
- mvn -B org.jacoco:jacoco-maven-plugin:prepare-agent verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar

Reason being: We are using bitbucket pipelines with the above mvn command, it does not fail the pipeline even though the quality gate fails, wanted to check if there is any alternative in GitLab

Hey there.

Take a look here:

That answer was in the context of SonarQube, but you can find similar documentation for SonarCloud here

So running mvn sonar:sonar -Dsonar.qualitygate.wait=true should do what you’re looking for.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.