Skip to content

Commit 0a6c3d7

Browse files
authored
build: Add a 1ES Pipeline Templates version of Canary (#20127)
This pipeline runs on our agents, rather than OneBranch's, and doesn't use all of the OneBranch machinery--which is only required for producing a vpack that we check into Windows. Since Canary will never be a vpack, we don't need to worry. It runs at about twice the speed _and_ we control the build images! This pull request also adds support for the "Terrapin Retrieval Tool," which will allow us to move away from having vcpkg contact remote servers directly to download source code (and which may become mandatory even in our OneBranch pipelines.)
1 parent 17e6126 commit 0a6c3d7

11 files changed

Lines changed: 329 additions & 2 deletions

.github/actions/spelling/expect/expect.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,7 @@ EPres
541541
EQU
542542
ERASEBKGND
543543
ERRORONEXIT
544+
espt
544545
esrp
545546
ESV
546547
ETW

build/config/tsa.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"codebaseName": "VSTS_Microsoft_OSGS_OpenConsole",
23
"instanceUrl": "https://microsoft.visualstudio.com",
34
"projectName": "OS",
45
"areaPath": "OS\\Windows Client and Services\\WinPD\\DFX-Developer Fundamentals and Experiences\\DEFT\\SHINE\\Terminal",

build/pipelines/1espt-nightly.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
trigger: none
2+
pr: none
3+
schedules:
4+
- cron: "30 3 * * 2-6" # Run at 03:30 UTC Tuesday through Saturday (After the work day in Pacific, Mon-Fri)
5+
displayName: "Nightly Terminal Build"
6+
branches:
7+
include:
8+
- main
9+
always: false # only run if there's code changes!
10+
11+
parameters:
12+
- name: publishToAzure
13+
displayName: "Deploy to **PUBLIC** Azure Storage"
14+
type: boolean
15+
default: true
16+
- name: official
17+
displayName: "Run on Official 1ES Pipeline Templates"
18+
type: boolean
19+
default: true
20+
21+
name: $(BuildDefinitionName)_$(date:yyMM).$(date:dd)$(rev:rrr)
22+
23+
variables:
24+
- template: templates-v2/variables-nuget-package-version.yml
25+
parameters:
26+
branding: Canary
27+
28+
extends:
29+
template: templates-v2/pipeline-1espt-full-release-build.yml
30+
parameters:
31+
official: ${{ parameters.official }}
32+
branding: Canary
33+
buildTerminal: true
34+
pgoBuildMode: Optimize
35+
codeSign: true
36+
signingIdentity:
37+
serviceName: $(SigningServiceName)
38+
appId: $(SigningAppId)
39+
tenantId: $(SigningTenantId)
40+
akvName: $(SigningAKVName)
41+
authCertName: $(SigningAuthCertName)
42+
signCertName: $(SigningSignCertName)
43+
useManagedIdentity: $(SigningUseManagedIdentity)
44+
clientId: $(SigningOriginalClientId)
45+
publishSymbolsToPublic: true
46+
symbolExpiryTime: 15
47+
symbolPublishingSubscription: $(SymbolPublishingServiceConnection)
48+
symbolPublishingProject: $(SymbolPublishingProject)
49+
${{ if eq(true, parameters.publishToAzure) }}:
50+
extraPublishJobs:
51+
- template: build/pipelines/templates-v2/job-deploy-to-azure-storage.yml@self
52+
parameters:
53+
pool:
54+
name: SHINE-INT-S
55+
os: windows
56+
dependsOn: [PublishSymbols]
57+
storagePublicRootURL: $(AppInstallerRootURL)
58+
subscription: $(AzureSubscriptionName)
59+
storageAccount: $(AzureStorageAccount)
60+
storageContainer: $(AzureStorageContainer)
61+
buildConfiguration: Release
62+
buildPlatforms: [x64, x86, arm64]
63+
environment: production-canary
64+

build/pipelines/templates-v2/job-build-package-wpf.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,13 @@ parameters:
3030
- name: signingIdentity
3131
type: object
3232
default: {}
33+
- name: outerTemplateContext
34+
type: object
35+
default: {}
3336

3437
jobs:
3538
- job: ${{ parameters.jobName }}
39+
templateContext: ${{ parameters.outerTemplateContext }}
3640
${{ if ne(length(parameters.pool), 0) }}:
3741
pool: ${{ parameters.pool }}
3842
${{ if eq(parameters.codeSign, true) }}:

build/pipelines/templates-v2/job-build-project.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,13 @@ parameters:
7474
- name: afterBuildSteps
7575
type: stepList
7676
default: []
77+
- name: outerTemplateContext
78+
type: object
79+
default: {}
7780

7881
jobs:
7982
- job: ${{ parameters.jobName }}
83+
templateContext: ${{ parameters.outerTemplateContext }}
8084
${{ if ne(length(parameters.pool), 0) }}:
8185
pool: ${{ parameters.pool }}
8286
strategy:

build/pipelines/templates-v2/job-merge-msix-into-bundle.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,13 @@ parameters:
3535
- name: signingIdentity
3636
type: object
3737
default: {}
38+
- name: outerTemplateContext
39+
type: object
40+
default: {}
3841

3942
jobs:
4043
- job: ${{ parameters.jobName }}
44+
templateContext: ${{ parameters.outerTemplateContext }}
4145
${{ if ne(length(parameters.pool), 0) }}:
4246
pool: ${{ parameters.pool }}
4347
${{ if eq(parameters.codeSign, true) }}:

build/pipelines/templates-v2/job-package-conpty.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,13 @@ parameters:
3030
- name: signingIdentity
3131
type: object
3232
default: {}
33+
- name: outerTemplateContext
34+
type: object
35+
default: {}
3336

3437
jobs:
3538
- job: ${{ parameters.jobName }}
39+
templateContext: ${{ parameters.outerTemplateContext }}
3640
${{ if ne(length(parameters.pool), 0) }}:
3741
pool: ${{ parameters.pool }}
3842
${{ if eq(parameters.codeSign, true) }}:
Lines changed: 233 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,233 @@
1+
parameters:
2+
- name: official
3+
type: boolean
4+
default: false
5+
- name: branding
6+
type: string
7+
default: Release
8+
values:
9+
- Release
10+
- Preview
11+
- Canary
12+
- Dev
13+
- name: buildTerminal
14+
type: boolean
15+
default: true
16+
- name: buildConPTY
17+
type: boolean
18+
default: false
19+
- name: buildWPF
20+
type: boolean
21+
default: false
22+
- name: pgoBuildMode
23+
type: string
24+
default: Optimize
25+
values:
26+
- Optimize
27+
- Instrument
28+
- None
29+
- name: buildConfigurations
30+
type: object
31+
default:
32+
- Release
33+
- name: buildPlatforms
34+
type: object
35+
default:
36+
- x64
37+
- x86
38+
- arm64
39+
- name: codeSign
40+
type: boolean
41+
default: true
42+
- name: terminalInternalPackageVersion
43+
type: string
44+
default: '0.0.8'
45+
46+
- name: publishSymbolsToPublic
47+
type: boolean
48+
default: true
49+
- name: symbolExpiryTime
50+
type: string
51+
default: 36530 # This is the default from PublishSymbols@2
52+
- name: symbolPublishingSubscription
53+
type: string
54+
- name: symbolPublishingProject
55+
type: string
56+
57+
- name: extraPublishJobs
58+
type: object
59+
default: []
60+
- name: signingIdentity
61+
type: object
62+
default: {}
63+
64+
resources:
65+
repositories:
66+
- repository: 1esPipelines
67+
type: git
68+
name: 1ESPipelineTemplates/1ESPipelineTemplates
69+
ref: refs/tags/release
70+
71+
extends:
72+
${{ if eq(parameters.official, true) }}:
73+
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
74+
${{ else }}:
75+
template: v1/1ES.Unofficial.PipelineTemplate.yml@1esPipelines
76+
parameters:
77+
customBuildTags:
78+
- 1ES.PT.ViaStartRight
79+
pool:
80+
name: SHINE-INT-L
81+
os: windows
82+
sdl:
83+
tsa:
84+
enabled: true
85+
configFile: '$(Build.SourcesDirectory)\build\config\tsa.json'
86+
binskim:
87+
enabled: true
88+
policheck:
89+
enabled: false
90+
severity: Note
91+
baseline:
92+
baselineFile: '$(Build.SourcesDirectory)\build\config\release.gdnbaselines'
93+
suppressionSet: default
94+
95+
stages:
96+
- stage: Build
97+
displayName: Build
98+
dependsOn: []
99+
jobs:
100+
- template: ./build/pipelines/templates-v2/job-build-project.yml@self
101+
parameters:
102+
outerTemplateContext:
103+
outputs:
104+
- output: pipelineArtifact
105+
targetPath: $(JobOutputDirectory)
106+
artifactName: $(JobOutputArtifactName)
107+
publishArtifacts: false # Handled by 1ESPT
108+
branding: ${{ parameters.branding }}
109+
buildTerminal: ${{ parameters.buildTerminal }}
110+
buildConPTY: ${{ parameters.buildConPTY }}
111+
buildWPF: ${{ parameters.buildWPF }}
112+
pgoBuildMode: ${{ parameters.pgoBuildMode }}
113+
buildConfigurations: ${{ parameters.buildConfigurations }}
114+
buildPlatforms: ${{ parameters.buildPlatforms }}
115+
generateSbom: false # this is handled by 1ESPT
116+
removeAllNonSignedFiles: true # appease the overlords
117+
codeSign: ${{ parameters.codeSign }}
118+
signingIdentity: ${{ parameters.signingIdentity }}
119+
beforeBuildSteps:
120+
- template: ./build/pipelines/templates-v2/steps-setup-versioning.yml@self
121+
122+
- template: ./build/pipelines/templates-v2/steps-install-terrapin.yml@self
123+
124+
- task: UniversalPackages@0
125+
displayName: Download terminal-internal Universal Package
126+
inputs:
127+
feedListDownload: 2b3f8893-a6e8-411f-b197-a9e05576da48
128+
packageListDownload: e82d490c-af86-4733-9dc4-07b772033204
129+
versionListDownload: ${{ parameters.terminalInternalPackageVersion }}
130+
131+
- ${{ if eq(parameters.buildWPF, true) }}:
132+
# Add an Any CPU build flavor for the WPF control bits
133+
- template: ./build/pipelines/templates-v2/job-build-project.yml@self
134+
parameters:
135+
outerTemplateContext:
136+
outputs:
137+
- output: pipelineArtifact
138+
targetPath: $(JobOutputDirectory)
139+
artifactName: $(JobOutputArtifactName)
140+
publishArtifacts: false # Handled by 1ESPT
141+
jobName: BuildWPF
142+
branding: ${{ parameters.branding }}
143+
buildTerminal: false
144+
buildWPFDotNetComponents: true
145+
buildConfigurations: ${{ parameters.buildConfigurations }}
146+
buildPlatforms:
147+
- Any CPU
148+
generateSbom: false # this is handled by 1ESPT
149+
removeAllNonSignedFiles: true # appease the overlords
150+
codeSign: ${{ parameters.codeSign }}
151+
signingIdentity: ${{ parameters.signingIdentity }}
152+
beforeBuildSteps:
153+
- template: ./build/pipelines/templates-v2/steps-setup-versioning.yml@self
154+
# WPF doesn't need the localizations or the universal package, but if it does... put them here.
155+
156+
- stage: Package
157+
displayName: Package
158+
dependsOn: [Build]
159+
jobs:
160+
- ${{ if eq(parameters.buildTerminal, true) }}:
161+
- template: ./build/pipelines/templates-v2/job-merge-msix-into-bundle.yml@self
162+
parameters:
163+
pool:
164+
name: SHINE-INT-S
165+
os: windows
166+
outerTemplateContext:
167+
outputs:
168+
- output: pipelineArtifact
169+
targetPath: $(JobOutputDirectory)
170+
artifactName: $(JobOutputArtifactName)
171+
publishArtifacts: false # Handled by 1ESPT
172+
jobName: Bundle
173+
branding: ${{ parameters.branding }}
174+
buildConfigurations: ${{ parameters.buildConfigurations }}
175+
buildPlatforms: ${{ parameters.buildPlatforms }}
176+
generateSbom: false # Handled by 1ESPT
177+
codeSign: ${{ parameters.codeSign }}
178+
signingIdentity: ${{ parameters.signingIdentity }}
179+
180+
- ${{ if eq(parameters.buildConPTY, true) }}:
181+
- template: ./build/pipelines/templates-v2/job-package-conpty.yml@self
182+
parameters:
183+
pool:
184+
name: SHINE-INT-S
185+
os: windows
186+
outerTemplateContext:
187+
outputs:
188+
- output: pipelineArtifact
189+
targetPath: $(JobOutputDirectory)
190+
artifactName: $(JobOutputArtifactName)
191+
publishArtifacts: false # Handled by 1ESPT
192+
buildConfigurations: ${{ parameters.buildConfigurations }}
193+
buildPlatforms: ${{ parameters.buildPlatforms }}
194+
generateSbom: false # this is handled by 1ESPT
195+
codeSign: ${{ parameters.codeSign }}
196+
signingIdentity: ${{ parameters.signingIdentity }}
197+
198+
- ${{ if eq(parameters.buildWPF, true) }}:
199+
- template: ./build/pipelines/templates-v2/job-build-package-wpf.yml@self
200+
parameters:
201+
pool:
202+
name: SHINE-INT-S
203+
os: windows
204+
outerTemplateContext:
205+
outputs:
206+
- output: pipelineArtifact
207+
targetPath: $(JobOutputDirectory)
208+
artifactName: $(JobOutputArtifactName)
209+
publishArtifacts: false # Handled by 1ESPT
210+
buildConfigurations: ${{ parameters.buildConfigurations }}
211+
buildPlatforms: ${{ parameters.buildPlatforms }}
212+
generateSbom: false # this is handled by 1ESPT
213+
codeSign: ${{ parameters.codeSign }}
214+
signingIdentity: ${{ parameters.signingIdentity }}
215+
216+
- stage: Publish
217+
displayName: Publish
218+
dependsOn:
219+
- Build
220+
- ${{ if or(parameters.buildTerminal, parameters.buildConPTY, parameters.buildWPF) }}:
221+
- Package
222+
jobs:
223+
- template: ./build/pipelines/templates-v2/job-publish-symbols-using-symbolrequestprod-api.yml@self
224+
parameters:
225+
pool:
226+
name: SHINE-INT-S
227+
os: windows
228+
includePublicSymbolServer: ${{ parameters.publishSymbolsToPublic }}
229+
symbolExpiryTime: ${{ parameters.symbolExpiryTime }}
230+
subscription: ${{ parameters.symbolPublishingSubscription }}
231+
symbolProject: ${{ parameters.symbolPublishingProject }}
232+
233+
- ${{ parameters.extraPublishJobs }}

build/pipelines/templates-v2/pipeline-full-release-build.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,10 @@ stages:
153153
- stage: Publish
154154
displayName: Publish
155155
pool: ${{ parameters.pool }}
156-
dependsOn: [Build, Package]
156+
dependsOn:
157+
- Build
158+
- ${{ if or(parameters.buildTerminal, parameters.buildConPTY, parameters.buildWPF) }}:
159+
- Package
157160
jobs:
158161
# We only support the vpack for Release builds that include Terminal
159162
- ${{ if and(containsValue(parameters.buildConfigurations, 'Release'), parameters.buildTerminal, parameters.publishVpackToWindows) }}:

build/pipelines/templates-v2/pipeline-onebranch-full-release-build.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,10 @@ extends:
279279

280280
- stage: Publish
281281
displayName: Publish
282-
dependsOn: [Build]
282+
dependsOn:
283+
- Build
284+
- ${{ if or(parameters.buildTerminal, parameters.buildConPTY, parameters.buildWPF) }}:
285+
- Package
283286
jobs:
284287
- template: ./build/pipelines/templates-v2/job-publish-symbols-using-symbolrequestprod-api.yml@self
285288
parameters:

0 commit comments

Comments
 (0)