-
Notifications
You must be signed in to change notification settings - Fork 54
Expand file tree
/
Copy pathazure-pipelines.yml
More file actions
177 lines (167 loc) · 6.52 KB
/
azure-pipelines.yml
File metadata and controls
177 lines (167 loc) · 6.52 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
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
trigger:
- master
resources:
repositories:
- repository: onebranchTemplates
type: git
name: OneBranch.Pipelines/GovernedTemplates
ref: refs/heads/main
variables:
- name: WindowsContainerImage
value: onebranch.azurecr.io/windows/ltsc2019/vse2022:latest
extends:
template: v2/OneBranch.Official.CrossPlat.yml@onebranchTemplates
parameters:
featureFlags:
WindowsHostVersion:
Network: KS3
globalSdl:
enabled: true
stages:
- stage: stage
jobs:
- job: job
pool:
type: windows
variables:
- name: ob_nugetPublishing_enabled
value: true
- name: ob_outputDirectory
value: '$(Build.ArtifactStagingDirectory)/ONEBRANCH_ARTIFACT'
- name: ob_git_fetchDepth
value: 0
steps:
- task: NuGetCommand@2
displayName: 'NuGet restore'
inputs:
restoreSolution: '$(Build.SourcesDirectory)\Forge.sln'
feedsToUse: config
nugetConfigPath: '$(Build.SourcesDirectory)/nuget.config'
- task: VSBuild@1
displayName: 'Build .NET sln for tests'
inputs:
solution: '$(Build.SourcesDirectory)\Forge.sln'
platform: 'Any CPU'
configuration: Release
- task: VSTest@2
displayName: 'Run Tests'
inputs:
testAssemblyVer2: |
$(Build.SourcesDirectory)\Forge.TreeWalker.UnitTests\obj\Release\Microsoft.Forge.TreeWalker.UnitTests.dll
runInParallel: True
- task: VSBuild@1
displayName: 'Build .NET sln and pack'
inputs:
solution: '$(Build.SourcesDirectory)\Forge.sln'
platform: 'Any CPU'
configuration: Release
msbuildArgs: '-t:pack'
- task: UseDotNet@2
displayName: 'Use .NET 6.0 SDK'
inputs:
packageType: 'sdk'
version: '6.0.100'
- task: UseDotNet@2
displayName: 'Use .NET 2.1 runtime'
inputs:
packageType: 'runtime'
version: '2.1.23'
- task: EsrpCodeSigning@5
displayName: 'ESRP CodeSigning - Authenticode MI'
inputs:
ConnectedServiceName: 'ForgeManagedIdentity'
UseMSIAuthentication: true
AppRegistrationClientId: 'ee5bddcd-7e6d-40c7-a645-8f0be9da4e24'
AppRegistrationTenantId: '33e01921-4d64-4f8c-a055-5bdaffd5e33d'
EsrpClientId: 'ec6597cc-b900-43a4-9d2b-ffc5cc4f8c56'
AuthAKVName: 'ForgeKeyVault2'
AuthSignCertName: 'ForgeKeyVault2Certificate'
ServiceEndpointUrl: 'https://api.esrp.microsoft.com/api/v2'
signConfigType: 'inlineSignParams'
FolderPath: '$(Build.SourcesDirectory)\Forge.TreeWalker\bin\Release'
Pattern: 'Microsoft.Forge.TreeWalker.dll'
OpusName: 'Microsoft Forge TreeWalker'
OpusInfo: 'https://www.github.com/microsoft/forge'
inlineOperation: |
[
{
"keyCode": "CP-230012",
"operationSetCode": "SigntoolSign",
"parameters": [
{
"parameterName": "OpusName",
"parameterValue": "Microsoft"
},
{
"parameterName": "OpusInfo",
"parameterValue": "http://www.microsoft.com"
},
{
"parameterName": "Append",
"parameterValue": "/as"
},
{
"parameterName": "FileDigest",
"parameterValue": "/fd \"SHA256\""
},
{
"parameterName": "PageHash",
"parameterValue": "/NPH"
},
{
"parameterName": "TimeStamp",
"parameterValue": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
}
],
"toolName": "sign",
"toolVersion": "1.0"
},
{
"keyCode": "CP-230012",
"operationSetCode": "SigntoolVerify",
"parameters": [],
"toolName": "sign",
"toolVersion": "1.0"
}
]
- task: EsrpCodeSigning@5
displayName: 'ESRP CodeSigning - NuGet MI'
inputs:
ConnectedServiceName: 'ForgeManagedIdentity'
UseMSIAuthentication: true
AppRegistrationClientId: 'ee5bddcd-7e6d-40c7-a645-8f0be9da4e24'
AppRegistrationTenantId: '33e01921-4d64-4f8c-a055-5bdaffd5e33d'
EsrpClientId: 'ec6597cc-b900-43a4-9d2b-ffc5cc4f8c56'
AuthAKVName: 'ForgeKeyVault2'
AuthSignCertName: 'ForgeKeyVault2Certificate'
ServiceEndpointUrl: 'https://api.esrp.microsoft.com/api/v2'
signConfigType: 'inlineSignParams'
FolderPath: '$(Build.SourcesDirectory)\Forge.TreeWalker\bin\Release'
Pattern: 'Microsoft.Forge.TreeWalker*.symbols.nupkg'
inlineOperation: |
[
{
"keyCode": "CP-401405",
"operationSetCode": "NuGetSign",
"parameters": [],
"toolName": "sign",
"toolVersion": "1.0"
},
{
"keyCode": "CP-401405",
"operationSetCode": "NuGetVerify",
"parameters": [],
"toolName": "sign",
"toolVersion": "1.0"
}
]
SessionTimeout: '60'
MaxConcurrency: '50'
MaxRetryAttempts: '5'
- task: NuGetCommand@2
displayName: 'NuGet push AzureArtifacts'
inputs:
command: push
packagesToPush: '$(Build.SourcesDirectory)\Forge.TreeWalker\bin\Release\Microsoft.Forge.TreeWalker*.symbols.nupkg'
publishVstsFeed: 'One/ForgeArtifacts'
allowPackageConflicts: true