-
Notifications
You must be signed in to change notification settings - Fork 6
/
azure-pipelines.yml
102 lines (87 loc) · 2.98 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: $(major).$(minor).$(revision)$(Rev:.r)
trigger:
- main
variables:
agentSolution: 'src/Agent.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
major: 5
minor: 0
revision: 0
fileVersion: '$(Build.BuildNumber)'
jobs:
- job: build
pool:
vmImage: 'windows-latest'
steps:
- task: DownloadSecureFile@1
displayName: 'Download Signing Key'
name: loupeAgentSigningKey
inputs:
secureFile: 'loupe.agent.snk'
- task: DownloadSecureFile@1
displayName: 'Download Code Signing Cert'
name: GibraltarSoftwareCCC
inputs:
secureFile: 'GibraltarSoftwareCCC.pfx'
overWrite: true
- task: CopyFiles@2
displayName: 'Copy Signing Key to Build Location'
inputs:
SourceFolder: '$(Agent.TempDirectory)'
Contents: 'loupe.agent.snk'
TargetFolder: '$(Build.SourcesDirectory)'
overWrite: true
- task: UseDotNet@2
displayName: 'Install .NET 6 (for test running)'
inputs:
version: '6.0.x'
- task: UseDotNet@2
displayName: 'Install .NET 8 (for building)'
inputs:
version: '8.0.x'
- 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:CustomVersion=$(fileVersion) /p:CustomInformationalVersion=$(fileVersion) /p:PackageVersion=$(fileVersion)'
- task: CopyFiles@2
displayName: 'Stage NuGet Packages'
inputs:
sourceFolder: '$(Build.SourcesDirectory)/src'
contents: '**/*.*nupkg'
flattenFolders: true
targetFolder: '$(Build.ArtifactStagingDirectory)/packages'
- task: NuGetCommand@2
displayName: 'Sign NuGet Packages'
inputs:
command: 'custom'
arguments: sign $(Build.ArtifactStagingDirectory)\packages\*.nupkg -CertificatePath $(Agent.TempDirectory)/GibraltarSoftwareCCC.pfx -CertificatePassword f4rd+GM% -Timestamper http://timestamp.comodoca.com -Verbosity detailed
- task: NuGetCommand@2
displayName: 'Sign NuGet Symbol Packages'
inputs:
command: 'custom'
arguments: sign $(Build.ArtifactStagingDirectory)\packages\*.snupkg -CertificatePath $(Agent.TempDirectory)/GibraltarSoftwareCCC.pfx -CertificatePassword f4rd+GM% -Timestamper http://timestamp.comodoca.com -Verbosity detailed
- task: PublishBuildArtifacts@1
inputs:
pathToPublish: '$(Build.ArtifactStagingDirectory)/packages'
artifactName: packages
- task: VSTest@2
inputs:
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
testSelector: 'testAssemblies'
testAssemblyVer2: |
**/bin/Release/**/*.Test.dll
**/bin/Release/**/*.Tests.dll
!EntityFramework.Tests.dll
searchFolder: '$(Build.SourcesDirectory)'
vsTestVersion: 'latest'
codeCoverageEnabled: true