aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Monteiro <marknr.monteiro@protonmail.com>2020-04-12 19:36:42 -0400
committerMark Monteiro <marknr.monteiro@protonmail.com>2020-04-21 15:53:22 -0400
commit66364eba922bd3e9c14fd5dde276928c1750f880 (patch)
tree45d221645f836209eaa05e38a4c8cd05314a9169
parentb937eb0c1150a650492e666016e268d2b3f463c9 (diff)
Add tasks required for SonarCloud integration
-rw-r--r--.ci/azure-pipelines-test.yml21
1 files changed, 21 insertions, 0 deletions
diff --git a/.ci/azure-pipelines-test.yml b/.ci/azure-pipelines-test.yml
index a5d29fb61..bdc1838fb 100644
--- a/.ci/azure-pipelines-test.yml
+++ b/.ci/azure-pipelines-test.yml
@@ -28,12 +28,26 @@ jobs:
submodules: true
persistCredentials: false
+ # This is required for the SonarCloud analyzer
+ - task: UseDotNet@2
+ displayName: "Install .NET Core SDK 2.1"
+ inputs:
+ packageType: sdk
+ version: '2.1.805'
+
- task: UseDotNet@2
displayName: "Update DotNet"
inputs:
packageType: sdk
version: ${{ parameters.DotNetSdkVersion }}
+ - task: SonarCloudPrepare@1
+ displayName: 'Prepare analysis on SonarCloud'
+ inputs:
+ SonarCloud: 'Sonarcloud for Jellyfin'
+ organization: 'jellyfin'
+ projectKey: 'jellyfin_jellyfin'
+
- task: DotNetCoreCLI@2
displayName: 'Run CLI Tests'
inputs:
@@ -44,6 +58,12 @@ jobs:
testRunTitle: $(Agent.JobName)
workingDirectory: "$(Build.SourcesDirectory)"
+ - task: SonarCloudAnalyze@1
+ displayName: 'Run Code Analysis'
+
+ - task: SonarCloudPublish@1
+ displayName: 'Publish Quality Gate Result'
+
- task: Palmmedia.reportgenerator.reportgenerator-build-release-task.reportgenerator@4
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux')) # !! THIS is for V1 only V2 will/should support merging
displayName: 'Run ReportGenerator'
@@ -62,3 +82,4 @@ jobs:
summaryFileLocation: "$(Agent.TempDirectory)/merged/**.xml"
pathToSources: $(Build.SourcesDirectory)
failIfCoverageEmpty: true
+