-
Notifications
You must be signed in to change notification settings - Fork 541
/
Copy pathbuild-client.yml
244 lines (235 loc) · 7.76 KB
/
build-client.yml
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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
# Copyright (c) Microsoft Corporation and contributors. All rights reserved.
# Licensed under the MIT License.
# build-client pipeline
name: $(Build.BuildId)
parameters:
- name: releaseBuildOverride
displayName: Release Build (default = not released)
type: string
default: none
values:
- none
- prerelease
- release
# Parameter for modifying the 'types' field in the package.json.
# If the value `none` is provided, the 'types' field in package.json will remain unchanged.
- name: packageTypesOverride
displayName: Change package types (default = none)
type: string
default: none
values:
- none
- alpha
- beta
# 'public' and 'untrimmed' options have not been fully developed yet
# - public
# - untrimmed
- name: publishOverride
displayName: Publish Override (default = based on branch)
type: string
default: default
values:
- default
- skip
- force
- name: interdependencyRange
displayName: Range to use for interdependencies (only affects releases) (default = ~)
type: string
default: "~"
# The " " value (a space) is a hacky workaround. ADO doesn't support empty string, but we ultimately use this value as
# an environment variable in a bash script (the 'update package versions' step), where it gets coerced back to the
# empty string.
values:
- "^"
- "~"
- " "
- name: buildToolsVersionToInstall
displayName: Fluid build tools version (default = installs version in repo)
type: string
default: repo
trigger:
branches:
include:
- main
- next
- lts
- release/*
paths:
include:
- .dockerignore
- .gitattributes
- .gitignore
- .gitmodules
- .git-blame-ignore-revs
- .markdownlint.json
- .npmrc
- .nvmrc
- .prettierignore
- .releaseGroup
- azure
- biome.json
- biome.jsonc
- BREAKING.md
- common/build/build-common
- ClientRequirements.md
- CODE_OF_CONDUCT.md
- CONTRIBUTING.md
- CredScanSuppressions.json
- examples
- experimental
- fluidBuild.config.cjs
- layerInfo.json
- lerna.json
- LICENSE
- NOTICE.md
- packages
- PACKAGES.md
- package.json
- patches/*
- pnpm-lock.yaml
- pnpm-workspace.yaml
- prettier.config.cjs
- README.md
- scripts/*
- SECURITY.md
- syncpack.config.cjs
# markdown-magic is part of the client release group
- tools/markdown-magic/*
- tools/pipelines/build-client.yml
- tools/pipelines/templates/build-npm-client-package.yml
- tools/pipelines/templates/include-set-package-version.yml
- tools/pipelines/templates/include-vars.yml
- tools/pipelines/templates/include-install-pnpm.yml
- tools/pipelines/templates/include-publish-npm-package.yml
- tools/pipelines/templates/include-publish-npm-package-deployment.yml
- tools/pipelines/templates/include-publish-npm-package-steps.yml
- tools/pipelines/templates/include-git-tag-steps.yml
- tools/pipelines/templates/include-use-node-version.yml
- tools/pipelines/templates/include-process-test-results.yml
- tools/pipelines/templates/include-policy-check.yml
- tools/pipelines/templates/upload-dev-manifest.yml
pr:
branches:
include:
- main
- next
- lts
- release/*
paths:
include:
- .dockerignore
- .gitattributes
- .gitignore
- .gitmodules
- .git-blame-ignore-revs
- .markdownlint.json
- .npmrc
- .nvmrc
- .prettierignore
- .releaseGroup
- azure
- biome.json
- biome.jsonc
- BREAKING.md
- common/build/build-common
- ClientRequirements.md
- CODE_OF_CONDUCT.md
- CONTRIBUTING.md
- CredScanSuppressions.json
- examples
- experimental
- fluidBuild.config.cjs
- layerInfo.json
- lerna.json
- LICENSE
- NOTICE.md
- packages
- PACKAGES.md
- package.json
- patches/*
- pnpm-lock.yaml
- pnpm-workspace.yaml
- prettier.config.cjs
- README.md
- scripts/*
- SECURITY.md
- syncpack.config.cjs
# markdown-magic is part of the client release group
- tools/markdown-magic/*
- tools/pipelines/build-client.yml
- tools/pipelines/templates/build-npm-client-package.yml
- tools/pipelines/templates/include-policy-check.yml
- tools/pipelines/templates/include-set-package-version.yml
- tools/pipelines/templates/include-vars.yml
- tools/pipelines/templates/include-install-pnpm.yml
- tools/pipelines/templates/include-use-node-version.yml
- tools/pipelines/templates/include-process-test-results.yml
- tools/pipelines/templates/upload-dev-manifest.yml
variables:
- template: /tools/pipelines/templates/include-vars.yml@self
parameters:
publishOverride: '${{ parameters.publishOverride }}'
releaseBuildOverride: '${{ parameters.releaseBuildOverride }}'
extends:
template: /tools/pipelines/templates/build-npm-client-package.yml@self
parameters:
publish: ${{ variables.publish }}
publishOverride: ${{ parameters.publishOverride }}
releaseBuildOverride: ${{ parameters.releaseBuildOverride }}
packageTypesOverride: ${{ parameters.packageTypesOverride }}
buildToolsVersionToInstall: ${{ parameters.buildToolsVersionToInstall }}
interdependencyRange: ${{ parameters.interdependencyRange }}
packageManagerInstallCommand: 'pnpm i --frozen-lockfile'
packageManager: pnpm
testCoverage: ${{ eq(variables['System.TeamProject'], 'public' ) }} # disabling code coverage for internal project since we don't use it
reportCodeCoverageComparison: ${{ eq(variables['Build.Reason'], 'PullRequest') }}
buildDirectory: .
tagName: client
isReleaseGroup: true
poolBuild: Large-eastus2
checkoutSubmodules: true
taskBundleAnalysis: true
taskLint: false # Linting is captured by `ci:build` via fluid-build
taskBuildDocs: true
publishDocs: true
# We only care about pipeline run telemetry for the CI runs on the internal project, not for PR runs in the public
# one. And since we don't batch commits for CI pipeline runs, the only reason we see for automated runs is IndividualCI.
telemetry: ${{ eq(variables['Build.Reason'], 'IndividualCI') }}
taskTest:
# This check must be run after the build, since it relies on built files being present. Eventually it might be moved
# to the "pack" stage since it can use the already-packed packages in that case. As it is the pipeline packs some
# packages twice.
- { name: "ci:test:jest", jobName: "JestTest" }
# - { name: "ci:test:realsvc:tinylicious", jobName: "RealsvcTinyliciousTest" }
# - { name: "ci:test:stress:tinylicious", jobName: "StressTinyliciousTest" }
# - { name: "check:are-the-types-wrong", jobName: "AreTheTypesWrong" }
coverageTests:
- { name: "ci:test:mocha", jobName: "MochaTest" }
# - { name: "ci:test:realsvc:local", jobName: "RealsvcLocalTest" }
testResultDirs:
- nyc/examples
- nyc/experimental
- nyc/packages
checks:
- checks
additionalBuildSteps:
- task: Bash@3
displayName: Inject devtools telemetry logger token
inputs:
targetType: 'inline'
script: |
set -eu -o pipefail
echo Generating .env
echo "DEVTOOLS_TELEMETRY_TOKEN=$(devtools-telemetry-key)" >> ./packages/tools/devtools/devtools-browser-extension/.env
- task: Npm@1
displayName: Build devtools
inputs:
command: 'custom'
workingDir: ./packages/tools/devtools/devtools-browser-extension/
customCommand: 'run webpack'
- task: 1ES.PublishPipelineArtifact@1
displayName: Publish Artifact - Devtools Browser Extension
inputs:
targetPath: './packages/tools/devtools/devtools-browser-extension/dist/bundle/'
artifactName: 'devtools-extension-bundle_attempt-$(System.JobAttempt)'
publishLocation: 'pipeline'