SonarQube: Enterprise Edition Version 9.9
Deployed with Docker and integrated to GitLab pipeline.
I have a dotnet project with the following structure.
MyProject
MyProject/Main
MyProject/dotnet-lib1
MyProject/dotnet-lib2
MyProject/python-lib
The dotnet code is tested with nunit and the python part with pytest.
I created a pipeline for sonarqube in gitlab and I run a yaml script like this:
- cd MyProject
- dotnet sonarscanner begin /k:"PROJECT" /d:sonar.login="${SONAR_TOKEN}" /d:"sonar.host.url=${SONAR_HOST_URL}" /d:sonar.cs.vscoveragexml.reportsPaths="./coverage.xml" /d:sonar.python.version=3.9 /d:sonar.python.coverage.reportPaths="./python-coverage.xml"
- chmod +x ./python-lib/dotnet_build.py (Copies during dotnet build and publish python content to MyProject/Main/assets/python..)
- dotnet restore
- dotnet build -c Release --no-incremental --no-restore
- dotnet-coverage collect 'dotnet test' -f xml -o './coverage.xml'
- cd ./python-lib
- python -m pytest --cov=repositories --cov=maps --cov-report=xml:../python-coverage.xml --junitxml=../pytest-results.xml
- cd ..
- dotnet sonarscanner end /d:sonar.login="${SONAR_TOKEN}"
but no results of the static code analysis or coverage for the python-lib is shown in the sonarqube results. What I miss to configure?