Skip to content

Commit 16d6985

Browse files
authored
Port the release build pipeline to YAML and 1ES Templates (#755)
This was necessary.
1 parent a0f40c6 commit 16d6985

2 files changed

Lines changed: 129 additions & 0 deletions

File tree

pipelines/release.yml

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
parameters:
2+
- name: minimal
3+
type: boolean
4+
displayName: Build Minimal Font (testing only)
5+
default: false
6+
7+
resources:
8+
repositories:
9+
- repository: 1ESPipelineTemplates
10+
type: git
11+
name: 1ESPipelineTemplates/1ESPipelineTemplates
12+
ref: refs/tags/release
13+
14+
extends:
15+
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
16+
parameters:
17+
pool:
18+
name: Azure Pipelines
19+
image: macOS-13
20+
os: macOS
21+
sdl:
22+
sourceAnalysisPool:
23+
name: SHINE-INT-L
24+
os: windows
25+
stages:
26+
- stage: build
27+
displayName: Build
28+
jobs:
29+
- job: build
30+
displayName: Build and Sign Cascadia
31+
templateContext:
32+
outputs:
33+
- output: pipelineArtifact
34+
targetPath: $(Build.SourcesDirectory)/out
35+
artifactName: archive
36+
steps:
37+
- task: UsePythonVersion@0
38+
displayName: 'Use Python 3.11'
39+
inputs:
40+
versionSpec: 3.11
41+
42+
- task: UseDotNet@2
43+
displayName: 'Use .NET sdk 6.x'
44+
inputs:
45+
version: 6.x
46+
47+
- bash: |-
48+
brew install ttfautohint
49+
pip install pip-tools
50+
pip-compile -U requirements.in
51+
pip install -r requirements.txt ufolint
52+
displayName: 'Install build dependencies'
53+
54+
- bash: 'ufolint sources/*.ufo'
55+
displayName: 'Lint sources'
56+
57+
- ${{ if eq(true, parameters.minimal) }}:
58+
- bash: 'python ./build.py -P -NF -M -I'
59+
displayName: 'Build font (minimal)'
60+
61+
- ${{ else }}:
62+
- bash: 'python ./build.py -S -W'
63+
displayName: 'Build font(s)'
64+
65+
- template: ./pipelines/templates/steps-esrp-signing.yml@self
66+
parameters:
67+
displayName: Submit Signing Request
68+
signingIdentity:
69+
serviceName: $(SigningServiceName)
70+
appId: $(SigningAppId)
71+
tenantId: $(SigningTenantId)
72+
akvName: $(SigningAKVName)
73+
authCertName: $(SigningAuthCertName)
74+
signCertName: $(SigningSignCertName)
75+
inputs:
76+
FolderPath: build
77+
Pattern: '*.ttf,*.otf'
78+
signConfigType: inlineSignParams
79+
inlineOperation: |
80+
[
81+
{
82+
"KeyCode": "CP-230012",
83+
"OperationCode": "SigntoolSign",
84+
"Parameters": {
85+
"OpusName": "Microsoft",
86+
"OpusInfo": "http://www.microsoft.com",
87+
"FileDigest": "/fd \"SHA256\"",
88+
"PageHash": "/NPH",
89+
"TimeStamp": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
90+
},
91+
"ToolName": "sign",
92+
"ToolVersion": "1.0"
93+
},
94+
{
95+
"KeyCode": "CP-230012",
96+
"OperationCode": "SigntoolVerify",
97+
"Parameters": {},
98+
"ToolName": "sign",
99+
"ToolVersion": "1.0"
100+
}
101+
]
102+
103+
- bash: |-
104+
mkdir -p out
105+
cd build
106+
zip -r ../out/CascadiaCode.zip ttf otf woff2
107+
displayName: 'Build Final Archive'
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
parameters:
2+
- name: displayName
3+
type: string
4+
default: ESRP Code Signing
5+
- name: inputs
6+
type: object
7+
default: {}
8+
- name: signingIdentity
9+
type: object
10+
default: {}
11+
12+
steps:
13+
- task: EsrpCodeSigning@5
14+
displayName: ${{ parameters.displayName }}
15+
inputs:
16+
ConnectedServiceName: ${{ parameters.signingIdentity.serviceName }}
17+
AppRegistrationClientId: ${{ parameters.signingIdentity.appId }}
18+
AppRegistrationTenantId: ${{ parameters.signingIdentity.tenantId }}
19+
AuthAKVName: ${{ parameters.signingIdentity.akvName }}
20+
AuthCertName: ${{ parameters.signingIdentity.authCertName }}
21+
AuthSignCertName: ${{ parameters.signingIdentity.signCertName }}
22+
${{ insert }}: ${{ parameters.inputs }}

0 commit comments

Comments
 (0)