forked from DillonAd/Evolution
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
55 lines (47 loc) · 1.73 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
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: PublishBuildArtifacts@1
displayName: 'Publish Artifact: source'
inputs:
PathtoPublish: '$(Build.SourcesDirectory)'
ArtifactName: source