-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathazure-pipelines.yml
More file actions
74 lines (63 loc) · 1.98 KB
/
azure-pipelines.yml
File metadata and controls
74 lines (63 loc) · 1.98 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
63
64
65
66
67
68
69
70
71
72
73
74
name: $(major).$(minor).$(revision)$(Rev:.r)
trigger:
- main
pool:
name: 'Dedicated Build Server'
variables:
agentSolution: 'src\Agent.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
major: 5
minor: 0
revision: 0
fileVersion: '$(Build.BuildNumber)'
jobs:
- job: build
pool:
name: 'Dedicated Build Server'
steps:
- task: DownloadSecureFile@1
displayName: 'Download Signing Key'
name: loupeAgentSigningKey
inputs:
secureFile: 'loupe.agent.snk'
overWrite: true
- task: CopyFiles@2
displayName: 'Copy Signing Key to Build Location'
inputs:
SourceFolder: '$(Agent.TempDirectory)'
Contents: 'loupe.agent.snk'
TargetFolder: '$(Build.SourcesDirectory)'
- task: NuGetToolInstaller@1
- task: NuGetCommand@2
displayName: 'Restore NuGet Packages'
inputs:
restoreSolution: '$(agentSolution)'
- task: VSBuild@1
displayName: 'Build NuGet Packages'
inputs:
solution: '$(agentSolution)'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
msbuildArgs: '/p:AssemblyVersion=$(fileVersion) /p:FileVersion=$(fileVersion) /p:CustomVersion=$(fileVersion) /p:CustomInformationalVersion=$(fileVersion) /p:PackageVersion=$(fileVersion)'
- task: CopyFiles@2
displayName: 'Stage NuGet Packages'
inputs:
sourceFolder: '$(Build.SourcesDirectory)\src'
contents: '**\bin\**\?(*.nupkg|*.snupkg)'
flattenFolders: true
targetFolder: '$(Build.ArtifactStagingDirectory)\packages'
- task: PublishBuildArtifacts@1
inputs:
pathToPublish: '$(Build.ArtifactStagingDirectory)\packages'
artifactName: packages
- task: VSTest@2
inputs:
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
testSelector: 'testAssemblies'
testAssemblyVer2: |
**\bin\Release\Loupe.Agent.Test.dll
searchFolder: '$(Build.SourcesDirectory)'
vsTestVersion: '17.0'
codeCoverageEnabled: true