-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.yml
42 lines (34 loc) · 1.27 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: ci-quality-gate
trigger:
- main
pool:
vmImage: 'windows-latest'
steps:
- task: DotNetCoreCLI@2
displayName: Restore
inputs:
command: 'restore'
projects: '**/*.csproj'
- task: SonarCloudPrepare@1
inputs:
SonarCloud: 'Sonar Billing Processing'
organization: 'icarotorres'
projectKey: 'IcaroTorres_rabbitmq-billing-processing'
extraProperties: |
sonar.cs.opencover.reportsPaths=$(Build.SourcesDirectory)/**/TestResults/*opencover.xml
sonar.cs.vstest.reportsPaths=$(Agent.TempDirectory)/**/TestResults/*.trx
- task: DotNetCoreCLI@2
displayName: Test
inputs:
command: 'test'
projects: '**/UnitTests.csproj'
arguments: '/p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=$(Build.SourcesDirectory)/TestResults/ --logger trx'
- task: SonarSource.sonarcloud.ce096e50-6155-4de8-8800-4221aaeed4a1.SonarCloudAnalyze@1
displayName: 'Run Code Analysis'
- task: SonarSource.sonarcloud.38b27399-a642-40af-bb7d-9971f69712e8.SonarCloudPublish@1
displayName: 'Publish Quality Gate Result'
- task: SimondeLang.sonarcloud-buildbreaker.sonar-buildbreaker.sonarcloud-buildbreaker@2
displayName: 'Break build on quality gate failure'
inputs:
SonarCloud: 'Sonar Billing Processing'
organization: 'icarotorres'