Skip to content

Commit 6c5545d

Browse files
committed
windows: add Windows release build for AzPipelines
Add an incomplete build stage for Windows. ESRP is not yet enabled. Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
1 parent 09d797e commit 6c5545d

1 file changed

Lines changed: 131 additions & 0 deletions

File tree

.azure-pipelines/release.yml

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,31 @@ parameters:
1515
default: false
1616
displayName: 'Enable ESRP code signing'
1717

18+
variables:
19+
- name: 'esrpConnectionName'
20+
value: 'ESRP-1ESGitClient'
21+
- name: 'esrpEndpointUrl'
22+
value: 'https://api.esrp.microsoft.com/api/v2'
23+
- name: 'esrpClientId'
24+
value: 'TODO'
25+
- name: 'esrpTenantId'
26+
value: 'TODO'
27+
- name: 'esrpAuthAkvName'
28+
value: 'TODO'
29+
- name: 'esrpAuthCertName'
30+
value: 'TODO'
31+
- name: 'esrpAuthSignCertName'
32+
value: 'TODO'
33+
1834
extends:
1935
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelines
2036
parameters:
37+
sdl:
38+
# SDL source analysis tasks only run on Windows images
39+
sourceAnalysisPool:
40+
name: GitClient-1ESHostedPool-intel-pc
41+
image: win-x86_64-ado1es
42+
os: windows
2143
stages:
2244
- stage: windows
2345
displayName: 'Windows'
@@ -28,5 +50,114 @@ extends:
2850
name: GitClient-1ESHostedPool-intel-pc
2951
image: win-x86_64-ado1es
3052
os: windows
53+
templateContext:
54+
outputs:
55+
- output: pipelineArtifact
56+
targetPath: '$(Build.ArtifactStagingDirectory)/payload'
57+
artifactName: 'win-x86_payload'
58+
- output: pipelineArtifact
59+
targetPath: '$(Build.ArtifactStagingDirectory)/installers'
60+
artifactName: 'win-x86_installers'
3161
steps:
3262
- checkout: self
63+
- task: UseDotNet@2
64+
displayName: 'Use .NET 8 SDK'
65+
inputs:
66+
packageType: sdk
67+
version: '8.x'
68+
- task: PowerShell@2
69+
displayName: 'Build payload'
70+
inputs:
71+
pwsh: true
72+
targetType: filePath
73+
filePath: '.\src\windows\Installer.Windows\layout.ps1'
74+
arguments: |
75+
-Configuration Release `
76+
-Output $(Build.ArtifactStagingDirectory)\payload `
77+
-SymbolOutput $(Build.ArtifactStagingDirectory)\symbols
78+
# - task: EsrpCodeSigning@5
79+
# condition: and(succeeded(), eq('${{ parameters.esrp }}', true))
80+
# displayName: 'Sign payload'
81+
# inputs:
82+
# connectedServiceName: '$(esrpConnectionName)'
83+
# appRegistrationClientId: '$(esrpClientId)'
84+
# appRegistrationTenantId: '$(esrpTenantId)'
85+
# authAkvName: '$(esrpAuthAkvName)'
86+
# authCertName: '$(esrpAuthCertName)'
87+
# authSignCertName: '$(esrpAuthSignCertName)'
88+
# serviceEndpointUrl: '$(esrpEndpointUrl)'
89+
# folderPath: '$(Build.ArtifactStagingDirectory)\payload'
90+
# pattern: '**\*.exe;**\*.dll'
91+
# signConfigType: inlineSignParams
92+
# inlineOperation: |
93+
# [
94+
# {
95+
# "keyCode": "TODO",
96+
# "operationCode": "SigntoolSign"
97+
# "parameters": {
98+
# "OpusName": "Microsoft",
99+
# "OpusInfo": "http://microsoft.com",
100+
# "FileDigest": "/fd \"SHA256\"",
101+
# "PageHash": "/NPH",
102+
# "Timestamp": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
103+
# },
104+
# "toolName": "sign",
105+
# "toolVersion": "1.0"
106+
# },
107+
# {
108+
# "keyCode": "TODO",
109+
# "operationCode": "SigntoolVerify",
110+
# "parameters": {},
111+
# "toolName": "sign",
112+
# "toolVersion": "1.0"
113+
# }
114+
# ]
115+
- task: PowerShell@2
116+
displayName: 'Build installers'
117+
inputs:
118+
pwsh: true
119+
targetType: inline
120+
script: |
121+
dotnet build '.\src\windows\Installer.Windows\Installer.Windows.csproj' `
122+
--configuration Release `
123+
--no-dependencies `
124+
-p:NoLayout=true `
125+
-p:PayloadPath="$(Build.ArtifactStagingDirectory)\payload"
126+
-p:OutputPath="$(Build.ArtifactStagingDirectory)\installers"
127+
# - task: EsrpCodeSigning@5
128+
# condition: and(succeeded(), eq('${{ parameters.esrp }}', true))
129+
# displayName: 'Sign installers'
130+
# inputs:
131+
# connectedServiceName: '$(esrpConnectionName)'
132+
# appRegistrationClientId: '$(esrpClientId)'
133+
# appRegistrationTenantId: '$(esrpTenantId)'
134+
# authAkvName: '$(esrpAuthAkvName)'
135+
# authCertName: '$(esrpAuthCertName)'
136+
# authSignCertName: '$(esrpAuthSignCertName)'
137+
# serviceEndpointUrl: '$(esrpEndpointUrl)'
138+
# folderPath: '$(Build.ArtifactStagingDirectory)\installers'
139+
# pattern: '**\*.exe'
140+
# signConfigType: inlineSignParams
141+
# inlineOperation: |
142+
# [
143+
# {
144+
# "keyCode": "TODO",
145+
# "operationCode": "SigntoolSign"
146+
# "parameters": {
147+
# "OpusName": "Microsoft",
148+
# "OpusInfo": "http://microsoft.com",
149+
# "FileDigest": "/fd \"SHA256\"",
150+
# "PageHash": "/NPH",
151+
# "Timestamp": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
152+
# },
153+
# "toolName": "sign",
154+
# "toolVersion": "1.0"
155+
# },
156+
# {
157+
# "keyCode": "TODO",
158+
# "operationCode": "SigntoolVerify",
159+
# "parameters": {},
160+
# "toolName": "sign",
161+
# "toolVersion": "1.0"
162+
# }
163+
# ]

0 commit comments

Comments
 (0)