From 9b64dbcae37f560efdc6ab66c1bf8f3045f15363 Mon Sep 17 00:00:00 2001 From: Stef Heyenrath Date: Sat, 28 Nov 2020 18:20:34 +0100 Subject: [PATCH] RUN_SONAR_CMD --- azure-pipelines-ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/azure-pipelines-ci.yml b/azure-pipelines-ci.yml index 646da22e..cc4cfd54 100644 --- a/azure-pipelines-ci.yml +++ b/azure-pipelines-ci.yml @@ -40,6 +40,7 @@ steps: projectKey: 'WireMock-Net_WireMock.Net' extraProperties: | sonar.cs.opencover.reportsPaths=**\coverage.netcoreapp3.1.opencover.xml + condition: and(succeeded(), eq(variables['RUN_SONARCLOUD'], 'yes')) # Begin SonarScanner - script: | @@ -54,6 +55,7 @@ steps: command: 'test' projects: './test/WireMock.Net.Tests/WireMock.Net.Tests.csproj' arguments: '--configuration Debug --framework netcoreapp3.1 --logger trx /p:CollectCoverage=true /p:CoverletOutputFormat=opencover' + condition: and(succeeded(), eq(variables['RUN_SONARCLOUD'], 'yes')) - script: | dotnet test ./test/WireMock.Net.Tests/WireMock.Net.Tests.csproj --configuration Debug --framework netcoreapp3.1 --logger trx /p:CollectCoverage=true /p:CoverletOutputFormat=opencover @@ -62,9 +64,11 @@ steps: - task: SonarCloudAnalyze@1 displayName: 'Run SonarCloud analysis' + condition: and(succeeded(), eq(variables['RUN_SONARCLOUD'], 'yes')) - task: SonarCloudPublish@1 displayName: 'Publish results on build summary' + condition: and(succeeded(), eq(variables['RUN_SONARCLOUD'], 'yes')) # End SonarScanner - script: |