We’re running into an issue where our quality gate is not failing as expected in a subproject inside a monorepo.
- Repository structure
- One parent repo with two monorepo projects within (let’s call them project A and B)
- Project A has a 100% code coverage quality gate
- Project B has an 80% code coverage quality gate
- These were setup using the “convert to monorepo” instructions here
- ALM used: Bitbucket Cloud
- CI system used: Bitbucket Cloud
- Scanner command used when applicable:
- sonarsource/sonarcloud-scan:2.0.0
- sonarsource/sonarcloud-quality-gate:0.1.6
- We’re running these in a
bitbucket-pipelines.yml
file like this:- pipe: sonarsource/sonarcloud-scan:2.0.0 # Use separate project settings for CBS code variables: EXTRA_ARGS: '-Dproject.settings=sonar-project-A.properties' - pipe: sonarsource/sonarcloud-quality-gate:0.1.6 variables: EXTRA_ARGS: '-Dproject.settings=sonar-project-A.properties'
- Languages of the repository: Python
- Error observed (wrap logs/code around with triple quotes ``` for proper formatting)
- The Summary page for a branch on Project A shows only 84.6% coverage on 11 new lines
And this page also shows that the quality gate passed - We expected Project A to fail the 100% code coverage quality gate
- The Summary page for a branch on Project A shows only 84.6% coverage on 11 new lines
- Steps to reproduce
- Make code changes without enough code coverage
- Trigger the Bitbucket pipeline on the repo
- Potential workaround
- None at the moment