|
36 | 36 | // It probably means the tool is not correctly installed.
|
37 | 37 | // `dotnet tool install --global dotnet-sonarscanner --ignore-failed-sources`
|
38 | 38 | //#tool "nuget:?package=MSBuild.SonarQube.Runner.Tool&version=4.8.0"
|
39 |
| -#tool "nuget:?package=dotnet-sonarscanner&version=6.1.0" |
| 39 | +#tool "nuget:?package=dotnet-sonarscanner&version=6.2.0" |
40 | 40 |
|
41 | 41 | //-------------------------------------------------------------
|
42 | 42 | // BACKWARDS COMPATIBILITY CODE - START
|
@@ -397,9 +397,9 @@ Task("Build")
|
397 | 397 | sonarSettings.Login = buildContext.General.SonarQube.Username;
|
398 | 398 | }
|
399 | 399 |
|
400 |
| - if (!string.IsNullOrWhiteSpace(buildContext.General.SonarQube.Password)) |
| 400 | + if (!string.IsNullOrWhiteSpace(buildContext.General.SonarQube.Token)) |
401 | 401 | {
|
402 |
| - sonarSettings.Password = buildContext.General.SonarQube.Password; |
| 402 | + sonarSettings.Token = buildContext.General.SonarQube.Token; |
403 | 403 | }
|
404 | 404 |
|
405 | 405 | // see https://cakebuild.net/api/Cake.Sonar/SonarBeginSettings/ for more information on
|
@@ -450,25 +450,25 @@ Task("Build")
|
450 | 450 | {
|
451 | 451 | await buildContext.SourceControl.MarkBuildAsPendingAsync("SonarQube");
|
452 | 452 |
|
453 |
| - var sonarEndSettings = new SonarEndSettings |
| 453 | + var sonarSettings = new SonarEndSettings |
454 | 454 | {
|
455 | 455 | // Use core clr version of SonarQube
|
456 | 456 | UseCoreClr = true
|
457 | 457 | };
|
458 | 458 |
|
459 | 459 | if (!string.IsNullOrWhiteSpace(buildContext.General.SonarQube.Username))
|
460 | 460 | {
|
461 |
| - sonarEndSettings.Login = buildContext.General.SonarQube.Username; |
| 461 | + sonarSettings.Login = buildContext.General.SonarQube.Username; |
462 | 462 | }
|
463 | 463 |
|
464 |
| - if (!string.IsNullOrWhiteSpace(buildContext.General.SonarQube.Password)) |
| 464 | + if (!string.IsNullOrWhiteSpace(buildContext.General.SonarQube.Token)) |
465 | 465 | {
|
466 |
| - sonarEndSettings.Password = buildContext.General.SonarQube.Password; |
| 466 | + sonarSettings.Token = buildContext.General.SonarQube.Token; |
467 | 467 | }
|
468 | 468 |
|
469 | 469 | Information("Ending SonarQube");
|
470 | 470 |
|
471 |
| - SonarEnd(sonarEndSettings); |
| 471 | + SonarEnd(sonarSettings); |
472 | 472 |
|
473 | 473 | await buildContext.SourceControl.MarkBuildAsSucceededAsync("SonarQube");
|
474 | 474 | }
|
|
0 commit comments