From 52ac408bbd38fa5d10fd7fc9acd0a3b693cd6762 Mon Sep 17 00:00:00 2001 From: lukeIam <2lukeiam@gmail.com> Date: Mon, 30 Apr 2018 18:00:39 +0200 Subject: [PATCH] Add SonarCloud analysis to the build pipeline (first test) --- appveyor.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index deca340e..7f70c73c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -14,6 +14,7 @@ init: - git config --global core.autocrlf true install: - ps: | + $Env:VOCALUXE_SKIP_POSTBUILD = $true $Env:CurrentCommitSha = "$(git rev-parse --verify HEAD)" if((-not $Env:githubRepoApiUri) -or ($Env:APPVEYOR_ACCOUNT_NAME -eq "VocaluxeBuildBot")){ @@ -46,12 +47,16 @@ 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.login="$Env:SonarQubeToken" } build: project: Vocaluxe.sln verbosity: normal after_build: - ps: | + SonarQube.Scanner.MSBuild.exe end /d:sonar.login="$Env:SonarQubeToken" ./.appveyor/runGitLink.ps1 cd Output