-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathazure-pipelines.yml
More file actions
62 lines (55 loc) · 1.5 KB
/
azure-pipelines.yml
File metadata and controls
62 lines (55 loc) · 1.5 KB
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
name: '$(Rev:r)' # Build.BuildId
trigger:
- master
pool:
name: Azure Pipelines
vmImage: 'windows-latest'
demands:
- msbuild
- visualstudio
- vstest
variables:
Solution: 'src/NLog.MailKit.sln'
BuildPlatform: 'Any CPU'
BuildConfiguration: 'Release'
Version: '6.0.5'
FullVersion: '$(Version).$(Build.BuildId)'
steps:
- task: DotNetCoreCLI@2
displayName: 'dotnet restore'
inputs:
command: restore
projects: '$(Solution)'
verbosityRestore: Minimal
- task: SonarCloudPrepare@3
displayName: 'Prepare SonarCloud analysis'
inputs:
SonarCloud: 'Sonarcloud'
organization: nlog
projectKey: nlog.mailkit
projectName: 'NLog Mailkit'
projectVersion: '$(FullVersion)'
- task: VSBuild@1
displayName: 'Build'
inputs:
solution: '$(Solution)'
msbuildArgs: '-v:m -p:Version=$(Version) -p:FileVersion=$(FullVersion) -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -p:ContinuousIntegrationBuild=true -p:EmbedUntrackedSources=true'
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
maximumCpuCount: true
logProjectEvents: false
- task: VSTest@2
displayName: 'Run Tests'
inputs:
testAssemblyVer2: |
**\*.tests.dll
!**\obj\**
!**\ref\**
codeCoverageEnabled: true
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
rerunFailedTests: true
- task: SonarCloudAnalyze@3
displayName: 'Run SonarCloud Analysis'
- task: SonarCloudPublish@3
displayName: 'Publish SonarCloud Quality Gate'