Skip to content

Commit 9ca4c66

Browse files
authored
Update ESRPCodeSigningTask to Version 5; Use WindowsAppSDK-EsrpCodeSigning-Steps.yml From WindowsAppSDKConfig Repository (#4499)
1 parent 09151ae commit 9ca4c66

File tree

4 files changed

+20
-143
lines changed

4 files changed

+20
-143
lines changed

build/AzurePipelinesTemplates/WindowsAppSDK-BuildBinaries-AnyCPU-Steps.yml

Lines changed: 6 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ steps:
3434

3535
- ${{ if eq(parameters.runStaticAnalysis, 'True') }}:
3636
- task: SDLNativeRules@3
37-
displayName: Run PREfast SDL Native Rules
37+
displayName: Run PREfast SDL Native Rules
3838
inputs:
3939
setupCommandlines: '"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsMSBuildCmd.bat"'
4040
msBuildCommandline: 'msbuild.exe /restore /nologo /nr:false $(Build.SourcesDirectory)\dev\Bootstrap\CS\Microsoft.WindowsAppRuntime.Bootstrap.Net\Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj'
@@ -56,50 +56,16 @@ steps:
5656
failOnAlert: true
5757

5858
- ${{ if eq(parameters.SignOutput, 'true') }}:
59-
- task: EsrpCodeSigning@2
60-
inputs:
61-
ConnectedServiceName: 'Project Reunion ESRP Code Signing Connection'
59+
- template: AzurePipelinesTemplates/WindowsAppSDK-EsrpCodeSigning-Steps.yml@WindowsAppSDKConfig
60+
parameters:
6261
FolderPath: '$(build.SourcesDirectory)\BuildOutput'
62+
UseMinimatch: true
6363
Pattern: |
6464
**/*.winmd
6565
**/*.dll
6666
**/*.exe
67-
UseMinimatch: true
68-
signConfigType: 'inlineSignParams'
69-
inlineOperation: |
70-
[
71-
{
72-
"keyCode": "CP-230012",
73-
"operationSetCode": "SigntoolSign",
74-
"parameters": [
75-
{
76-
"parameterName": "OpusName",
77-
"parameterValue": "Microsoft"
78-
},
79-
{
80-
"parameterName": "OpusInfo",
81-
"parameterValue": "http://www.microsoft.com"
82-
},
83-
{
84-
"parameterName": "PageHash",
85-
"parameterValue": "/NPH"
86-
},
87-
{
88-
"parameterName": "FileDigest",
89-
"parameterValue": "/fd sha256"
90-
},
91-
{
92-
"parameterName": "TimeStamp",
93-
"parameterValue": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
94-
}
95-
],
96-
"toolName": "signtool.exe",
97-
"toolVersion": "6.2.9304.0"
98-
}
99-
]
100-
SessionTimeout: '60'
101-
MaxConcurrency: '50'
102-
MaxRetryAttempts: '5'
67+
KeyCode: 'CP-230012'
68+
displayName: 'Authenticode CodeSign Binaries'
10369

10470
# Artifacts are uploaded via ob_outputDirectory where the each vPack Push jobs downloads from
10571
# so the CopyFiles below are to move all the vPack files to the right locations

build/AzurePipelinesTemplates/WindowsAppSDK-BuildBinaries-Steps.yml

Lines changed: 5 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -115,50 +115,16 @@ steps:
115115
# continueOnError: true
116116

117117
- ${{ if eq(parameters.SignOutput, 'true') }}:
118-
- task: EsrpCodeSigning@2
119-
inputs:
120-
ConnectedServiceName: 'Project Reunion ESRP Code Signing Connection'
118+
- template: AzurePipelinesTemplates/WindowsAppSDK-EsrpCodeSigning-Steps.yml@WindowsAppSDKConfig
119+
parameters:
121120
FolderPath: '$(build.SourcesDirectory)\BuildOutput'
121+
UseMinimatch: true
122122
Pattern: |
123123
**/*.winmd
124124
**/*.dll
125125
**/*.exe
126-
UseMinimatch: true
127-
signConfigType: 'inlineSignParams'
128-
inlineOperation: |
129-
[
130-
{
131-
"keyCode": "CP-230012",
132-
"operationSetCode": "SigntoolSign",
133-
"parameters": [
134-
{
135-
"parameterName": "OpusName",
136-
"parameterValue": "Microsoft"
137-
},
138-
{
139-
"parameterName": "OpusInfo",
140-
"parameterValue": "http://www.microsoft.com"
141-
},
142-
{
143-
"parameterName": "PageHash",
144-
"parameterValue": "/NPH"
145-
},
146-
{
147-
"parameterName": "FileDigest",
148-
"parameterValue": "/fd sha256"
149-
},
150-
{
151-
"parameterName": "TimeStamp",
152-
"parameterValue": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
153-
}
154-
],
155-
"toolName": "signtool.exe",
156-
"toolVersion": "6.2.9304.0"
157-
}
158-
]
159-
SessionTimeout: '60'
160-
MaxConcurrency: '50'
161-
MaxRetryAttempts: '5'
126+
KeyCode: 'CP-230012'
127+
displayName: 'Authenticode CodeSign Binaries'
162128

163129
# Artifacts are uploaded via ob_outputDirectory where the each vPack Push jobs downloads from
164130
# so the CopyFiles below are to move all the vPack files to the right locations

build/AzurePipelinesTemplates/WindowsAppSDK-BuildMRT-Steps.yml

Lines changed: 6 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ steps:
3131

3232
- ${{ if eq(parameters.runStaticAnalysis, 'True') }}:
3333
- task: SDLNativeRules@3
34-
displayName: Run PREfast SDL Native Rules
34+
displayName: Run PREfast SDL Native Rules
3535
condition: and(succeeded(), eq(variables['buildPlatform'], 'x64'), eq(variables['buildConfiguration'], 'Release'))
3636
inputs:
3737
setupCommandlines: '"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsMSBuildCmd.bat"'
@@ -68,50 +68,16 @@ steps:
6868
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
6969

7070
- ${{ if eq(parameters.SignOutput, 'true') }}:
71-
- task: EsrpCodeSigning@2
72-
inputs:
73-
ConnectedServiceName: 'Project Reunion ESRP Code Signing Connection'
71+
- template: AzurePipelinesTemplates/WindowsAppSDK-EsrpCodeSigning-Steps.yml@WindowsAppSDKConfig
72+
parameters:
7473
FolderPath: '$(build.SourcesDirectory)\BuildOutput'
74+
UseMinimatch: true
7575
Pattern: |
7676
**/*.winmd
7777
**/*.dll
7878
**/*.exe
79-
UseMinimatch: true
80-
signConfigType: 'inlineSignParams'
81-
inlineOperation: |
82-
[
83-
{
84-
"keyCode": "CP-230012",
85-
"operationSetCode": "SigntoolSign",
86-
"parameters": [
87-
{
88-
"parameterName": "OpusName",
89-
"parameterValue": "Microsoft"
90-
},
91-
{
92-
"parameterName": "OpusInfo",
93-
"parameterValue": "http://www.microsoft.com"
94-
},
95-
{
96-
"parameterName": "PageHash",
97-
"parameterValue": "/NPH"
98-
},
99-
{
100-
"parameterName": "FileDigest",
101-
"parameterValue": "/fd sha256"
102-
},
103-
{
104-
"parameterName": "TimeStamp",
105-
"parameterValue": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
106-
}
107-
],
108-
"toolName": "signtool.exe",
109-
"toolVersion": "6.2.9304.0"
110-
}
111-
]
112-
SessionTimeout: '60'
113-
MaxConcurrency: '50'
114-
MaxRetryAttempts: '5'
79+
KeyCode: 'CP-230012'
80+
displayName: 'Authenticode CodeSign Binaries'
11581

11682
- task: CopyFiles@2
11783
displayName: MoveToOutputDirectory

build/AzurePipelinesTemplates/WindowsAppSDK-PackTransportPackage-Stage.yml

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -193,33 +193,12 @@ stages:
193193
# arguments: -Platform "x64" -Configuration "release" -AzureBuildStep "BuildMock" -OutputDirectory "$(build.artifactStagingDirectory)\FullNuget" -PackageVersion "$(packageVersion)"
194194

195195
- ${{ if eq(parameters.SignOutput, 'true') }}:
196-
- task: EsrpCodeSigning@2
197-
inputs:
198-
ConnectedServiceName: 'Project Reunion ESRP Code Signing Connection'
196+
- template: AzurePipelinesTemplates/WindowsAppSDK-EsrpCodeSigning-Steps.yml@WindowsAppSDKConfig
197+
parameters:
199198
FolderPath: $(build.artifactStagingDirectory)\FullNuget
200199
Pattern: 'Microsoft.WindowsAppSDK.Foundation*.nupkg'
200+
KeyCode: 'CP-401405'
201201
UseMinimatch: true
202-
signConfigType: 'inlineSignParams'
203-
inlineOperation: |
204-
[
205-
{
206-
"KeyCode" : "CP-401405",
207-
"OperationCode" : "NuGetSign",
208-
"Parameters" : {},
209-
"ToolName" : "sign",
210-
"ToolVersion" : "1.0"
211-
},
212-
{
213-
"KeyCode" : "CP-401405",
214-
"OperationCode" : "NuGetVerify",
215-
"Parameters" : {},
216-
"ToolName" : "sign",
217-
"ToolVersion" : "1.0"
218-
}
219-
]
220-
SessionTimeout: '60'
221-
MaxConcurrency: '50'
222-
MaxRetryAttempts: '5'
223202

224203
- task: CopyFiles@2
225204
displayName: MoveToOutputDirectory

0 commit comments

Comments
 (0)