From 71126989a7abfb6b60335e89a3a6abaa77f9e749 Mon Sep 17 00:00:00 2001 From: lukeIam <2lukeiam@gmail.com> Date: Mon, 30 Apr 2018 19:27:00 +0200 Subject: [PATCH] SonarQube analysis only for x64 builds (as SonarCloud does not support multiple builds per version) --- appveyor.yml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 061592bc..8e3d8162 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -46,17 +46,24 @@ before_build: { Write-Warning "Genius-Video download failed" } - nuget restore -DisableParallelProcessing - choco install "msbuild-sonarqube-runner" -y - if ($env:APPVEYOR_PULL_REQUEST_NUMBER) { SonarQube.Scanner.MSBuild.exe begin /k:"lukeIam_Vocaluxe" /d:sonar.organization="lukeiam-github" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.login="$Env:SonarQubeToken" /d:"sonar.analysis.mode=preview" /d:"sonar.pullrequest.provider=GitHub" /d:"sonar.pullrequest.key=$env:APPVEYOR_PULL_REQUEST_NUMBER" /d:"sonar.pullrequest.github.repository=lukeIam/Vocaluxe" /d:"sonar.pullrequest.base=$env:APPVEYOR_REPO_BRANCH" /d:"sonar.pullrequest.branch=$env:APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME/$env:APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH" } - if (-Not $env:APPVEYOR_PULL_REQUEST_NUMBER) { SonarQube.Scanner.MSBuild.exe begin /k:"lukeIam_Vocaluxe" /d:sonar.organization="lukeiam-github" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.projectVersion="$Env:GIT_VERSION_TAG" /d:sonar.login="$Env:SonarQubeToken" } - + + nuget restore -DisableParallelProcessing + + if($Env:PLATFORM -eq 'x64') + { + choco install "msbuild-sonarqube-runner" -y + if ($env:APPVEYOR_PULL_REQUEST_NUMBER) { SonarQube.Scanner.MSBuild.exe begin /k:"lukeIam_Vocaluxe" /d:sonar.organization="lukeiam-github" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.login="$Env:SonarQubeToken" /d:"sonar.analysis.mode=preview" /d:"sonar.pullrequest.provider=GitHub" /d:"sonar.pullrequest.key=$env:APPVEYOR_PULL_REQUEST_NUMBER" /d:"sonar.pullrequest.github.repository=lukeIam/Vocaluxe" /d:"sonar.pullrequest.base=$env:APPVEYOR_REPO_BRANCH" /d:"sonar.pullrequest.branch=$env:APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME/$env:APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH" } + if (-Not $env:APPVEYOR_PULL_REQUEST_NUMBER) { SonarQube.Scanner.MSBuild.exe begin /k:"lukeIam_Vocaluxe" /d:sonar.organization="lukeiam-github" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.projectVersion="$Env:GIT_VERSION_TAG" /d:sonar.login="$Env:SonarQubeToken" } + } build: project: Vocaluxe.sln verbosity: normal after_build: - ps: | - SonarQube.Scanner.MSBuild.exe end /d:sonar.login="$Env:SonarQubeToken" + if($Env:PLATFORM -eq 'x64') + { + SonarQube.Scanner.MSBuild.exe end /d:sonar.login="$Env:SonarQubeToken" + } ./.appveyor/runGitLink.ps1 cd Output