This repository has been archived by the owner on Oct 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
azure-pipelines.yml
78 lines (67 loc) · 2.48 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
74
75
76
77
78
name: $(Build.BuildId)
resources:
- repo: self
queue:
name: Hosted VS2017
variables:
buildConfiguration: 'Release'
Parameters.RestoreBuildProjects: ''
steps:
- task: DotNetCoreCLI@2
displayName: Restore
inputs:
command: restore
projects: '$(Parameters.RestoreBuildProjects)'
- task: SonarSource.sonarcloud.14d9cde6-c1da-4d55-aa01-2965cd301255.SonarCloudPrepare@1
displayName: 'Prepare analysis on SonarCloud'
inputs:
SonarCloud: Evolution
organization: 'dillonad-github'
projectKey: 'DillonAd_Evolution'
projectName: Evolution
extraProperties: |
sonar.cs.opencover.reportsPaths="$(Build.SourcesDirectory)\opencover.xml"
- task: DotNetCoreCLI@2
displayName: Build
inputs:
projects: '$(Parameters.RestoreBuildProjects)'
arguments: '--configuration $(BuildConfiguration) --no-restore'
- task: DotNetCoreCLI@2
displayName: Test
inputs:
command: test
projects: '**/*Test*/*.csproj'
arguments: '--configuration $(BuildConfiguration) --filter "Category=unit" /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=$(Build.SourcesDirectory)/opencover.xml '
- task: SonarSource.sonarcloud.ce096e50-6155-4de8-8800-4221aaeed4a1.SonarCloudAnalyze@1
displayName: 'Run Code Analysis'
# This will fail on PR builds https://go.microsoft.com/fwlink/?linkid=862029
continueOnError: true
- task: SonarSource.sonarcloud.38b27399-a642-40af-bb7d-9971f69712e8.SonarCloudPublish@1
displayName: 'Publish Quality Gate Result'
# This will fail on PR builds https://go.microsoft.com/fwlink/?linkid=862029
continueOnError: true
- task: DotNetCoreCLI@2
displayName: Pack
inputs:
command: pack
projects: './Evolution/Evolution.csproj'
configuration: '$(BuildConfiguration)'
packagesToPack: './Evolution/Evolution.csproj'
packDirectory: '$(Build.ArtifactStagingDirectory)/NuGet'
- task: DotNetCoreCLI@2
displayName: Publish
inputs:
command: publish
publishWebProjects: false
projects: './Evolution.Test.Integration/Evolution.Test.Integration.csproj'
arguments: '--configuration $(BuildConfiguration) --output $(Build.ArtifactStagingDirectory)/Test'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: IntegrationTests'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)/Test'
ArtifactName: IntegrationTests
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: NuGet'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)/NuGet'
ArtifactName: NuGet