File tree Expand file tree Collapse file tree 1 file changed +19
-12
lines changed
Expand file tree Collapse file tree 1 file changed +19
-12
lines changed Original file line number Diff line number Diff line change @@ -15,15 +15,22 @@ install:
1515 - dotnet restore
1616before_script :
1717 - export PATH="$PATH:$HOME/.dotnet/tools"
18- script :
19- - |
20- dotnet sonarscanner begin \
21- /k:"$SONAR_PROJECT_KEY" \
22- /d:sonar.organization="$SONAR_ORGANIZATION_KEY" \
23- /d:sonar.host.url="$SONAR_URL" \
24- /d:sonar.login="$SONAR_TOKEN" \
25- /d:sonar.cs.vstest.reportsPaths="${TEST_RESULTS_PATH}/results.trx" \
26- /d:sonar.cs.opencover.reportsPaths="${TEST_RESULTS_PATH}/coverage.xml"
27- - dotnet test -c Release -l:"trx;LogFileName=results.trx" /p:CollectCoverage=true /p:CoverletOutputFormat="opencover" /p:CoverletOutput="TestResults/coverage.xml"
28- - dotnet publish -c Release
29- - dotnet sonarscanner end /d:sonar.login="$SONAR_TOKEN"
18+ jobs :
19+ include :
20+ - stage : Sonar (begin)
21+ script :
22+ - |
23+ dotnet sonarscanner begin \
24+ /k:"$SONAR_PROJECT_KEY" \
25+ /d:sonar.organization="$SONAR_ORGANIZATION_KEY" \
26+ /d:sonar.host.url="$SONAR_URL" \
27+ /d:sonar.login="$SONAR_TOKEN" \
28+ /d:sonar.cs.vstest.reportsPaths="${TEST_RESULTS_PATH}/results.trx" \
29+ /d:sonar.cs.opencover.reportsPaths="${TEST_RESULTS_PATH}/coverage.xml"
30+ - stage : Test
31+ script :
32+ - dotnet test -c Release -l:"trx;LogFileName=results.trx" /p:CollectCoverage=true /p:CoverletOutputFormat="opencover" /p:CoverletOutput="TestResults/coverage.xml"
33+ - dotnet publish -c Release
34+ - stage : Sonar (end)
35+ script :
36+ - dotnet sonarscanner end /d:sonar.login="$SONAR_TOKEN"
You can’t perform that action at this time.
0 commit comments