.NET Core SDK and Sonar Scanner
10K+
Dockerfile linkslatest -> .net Core SDK 2.1dotnet-2.2 -> .net Core SDK 2.2dotnet-3.0 -> .net Core SDK 3.0dotnet-3.1 -> .net Core SDK 3.1dotnet-5rc1 -> .net Core SDK 5rc1dotnet-5.0 -> .net Core SDK 5.0Dockerimage with .net Core SDK and SonarScanner used for CI/CD pipelines.
https://sonarcloud.io)/my-project/my_project.sln)bitbucket-pipelines.ymlimage: inverscom/dotnetcore-sdk-sonar-scanner:dotnet-5rc1
definitions:
services:
docker:
memory: 3072
pipelines:
branches:
"{dev,master}":
- step:
name: Quality analysis to Sonarqube
services:
- docker
caches:
- dotnetcore
script:
- export DOTNET_ROLL_FORWARD=Major
- export PATH="$PATH:/root/.dotnet/tools"
- export PROJECT_NAME=$SOLUTION_FILE
- dotnet test --collect:"XPlat Code Coverage" "/p:CollectCoverage=true"
- reportgenerator "-reports:**/*.cobertura.xml" "-targetdir:results/coverage" "-reporttypes:SonarQube" "-assemblyfilters:-Ben.Demystifier;-FluentValidation*"
- dotnet sonarscanner begin /d:sonar.host.url=$SONAR_URL /d:sonar.login=$SONAR_TOKEN /key:$SONAR_KEY /d:sonar.coverageReportPaths="results/coverage/SonarQube.xml" /d:sonar.exclusions="**/Migrations/*,Server/Views/**/*,**/wwwroot/**/*"
- dotnet build $PROJECT_NAME
- dotnet sonarscanner end /d:sonar.login=$SONAR_TOKEN
Content type
Image
Digest
Size
769.6 MB
Last updated
almost 7 years ago
docker pull inverscom/dotnetcore-sdk-sonar-scanner