Run quality gate check via circleCI

Hi.
Github private projects that the CI is CircleCI.

We want to migrate to the cloud and to have PR Analysis in addition to master branch scans.
First we have tried to use the auto scan… To problems:

  1. The version cannot be taken from the package json
  2. It requires to commit the coverage folder(test output) to see the coverage

So we have tried to use sonarqube-scanner and now have other problems:

  1. The PR Is running the command but it doesn’t know this is PR and doesn’t fail it. It analyse the branch and save the details as the master branch

Anyone can help here?
What i need:

  1. Run the analyse on master upon every commit
  2. Run branch analysis on branches(Quality gate)
  3. Add version from package json
  4. Don’t want to commit test output folder

Hi @aviadhadida,

There is a known problem with CircleCI that the first commit of a PR is not being analyzed as a PR. See the explanation here.

Hope that clears it up!

I had fundamental mistake here.

I assumed that working with the plugin on CircleCI will not run quality gate check on PR.
I was wrong :slight_smile:

So if i look again on the sections i needed to my workflow:
1. Run the analyse on master upon every commit - sonarsource/sonarcloud Orb handle that
2. Run branch analysis on branches(Quality gate) - sonarsource/sonarcloud Orb run quality gate check on PR which is good enough
3. Add version from package json - I used the sonar-project.properties and maintain is manually when i change the package.json on version releases
4.Don’t want to commit test output folder - sonarsource/sonarcloud doesn’t require me to commit coverage folder, when i run from circleCI before i run the sonarscan i run the app tests

1 Like

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