Must-share information (formatted with Markdown):
- which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
Community Edition Version 8.9.6 (build 50800) - what are you trying to achieve
I believe, it is a default behavior of sonarqube as while we rerun the pipeline, sonarqube considers the job being run on a newer code which has no change with code that was scanned previous time, therefore pipeline pass saying 0 lines to cover in New Code. But the code was not newer in reality, thus we expect sonarqube check to fail again.
When a Quality Gate fails due to condition on coverage of new code, it should show status as FAILED if we trigger the sonar scan pipeline another time.
- what have you tried so far to achieve this
So far, We have checked that version in each activity is set as the job id of the gitlab pipeline and we are using ciricihq/gitlab-sonar-scanner image to run the scan. So not sure how the version is set also, not sure if changing the leak period using sonar.properties file will help.