forked from outcomputelabs/outkeep
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
73 lines (59 loc) · 1.54 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
63
64
65
66
67
68
69
70
71
72
73
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
trigger:
- master
pool:
vmImage: 'ubuntu-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: 'outkeep'
projectName: 'Outkeep'
extraProperties: |
sonar.cs.opencover.reportsPaths="**/coverage.opencover.xml"
- task: DotNetCoreCLI@2
displayName: "Restore"
inputs:
command: 'restore'
feedsToUse: 'select'
- task: DotNetCoreCLI@2
displayName: "Build"
inputs:
command: 'build'
arguments: '--no-restore --configuration $(buildConfiguration)'
- 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: DotNetCoreCLI@2
displayName: "Pack"
inputs:
command: 'pack'
packagesToPack:
includesymbols: true
versioningScheme: 'byPrereleaseNumber'
majorVersion: '1'
minorVersion: '0'
patchVersion: '0'
- task: SonarCloudPublish@1
inputs:
pollingTimeoutSec: '300'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'