-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
62 lines (49 loc) · 1.53 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
trigger:
- master
pool:
vmImage: 'windows-latest'
variables:
buildConfiguration: 'Release'
steps:
- task: UseDotNet@2
inputs:
packageType: 'sdk'
version: '2.x'
- task: UseDotNet@2
inputs:
packageType: 'sdk'
version: '3.1.x'
- task: SonarCloudPrepare@1
inputs:
SonarCloud: 'SonarCloud'
organization: 'outcompute'
scannerMode: 'MSBuild'
projectKey: 'learn'
projectName: 'Learn'
extraProperties: |
sonar.cs.opencover.reportsPaths="**/coverage.opencover.xml"
- task: DotNetCoreCLI@2
displayName: "Restore"
inputs:
command: 'restore'
feedsToUse: 'select'
- task: MSBuild@1
inputs:
solution: '**/*.sln'
configuration: '$(buildConfiguration)'
- task: SqlDacpacDeploymentOnMachineGroup@0
inputs:
TaskType: 'dacpac'
DacpacFile: '$(Build.SourcesDirectory)/src/Learn.Server.Data.SqlServer.Database/bin/$(buildConfiguration)/Learn.Server.Data.SqlServer.Database.dacpac'
TargetMethod: 'publishProfile'
PublishProfile: '$(Build.SourcesDirectory)/src/Learn.Server.Data.SqlServer.Database/bin/$(buildConfiguration)/Learn.Server.Data.SqlServer.Database.publish.xml'
- task: DotNetCoreCLI@2
displayName: "Test"
inputs:
command: 'test'
arguments: '--no-build /p:CollectCoverage=true /p:CoverletOutput=coverage.opencover.xml /p:CoverletOutputFormat=opencover --configuration $(buildConfiguration)'
- task: SonarCloudAnalyze@1
- task: SonarCloudPublish@1
inputs:
pollingTimeoutSec: '300'