-
Notifications
You must be signed in to change notification settings - Fork 198
/
Copy pathazure-pipelines.yml
261 lines (236 loc) · 9.87 KB
/
azure-pipelines.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
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
variables:
- group: InfoSec-SecurityResults
- name: products
value: 6eff390d-80c0-4456-81b6-6abafa71e768
trigger:
branches:
include:
- 'main'
- 'release/*'
resources:
repositories:
- repository: OfficePipelineTemplates
type: git
name: 1ESPipelineTemplates/OfficePipelineTemplates
ref: refs/tags/release
- repository: AppHostingSdk
type: git
name: ISS/metaos-hub-sdk
ref: $(AppHostLatestBranch)
- repository: AppHostingSdkV2
type: git
name: ISS/metaos-hub-sdk
ref: $(AppHostV2ReleaseBranch)
- repository: AppHostingSdkV3
type: git
name: ISS/metaos-hub-sdk
ref: $(AppHostV3ReleaseBranch)
- repository: AppHostingSdkV4
type: git
name: ISS/metaos-hub-sdk
ref: $(AppHostV4ReleaseBranch)
- repository: AndroidAppHostingSdk
type: git
name: ISS/metaos-hub-sdk-android
- repository: IOSAppHostingSdk
type: git
name: ISS/metaos-hub-sdk-ios
extends:
template: v1/Office.Official.PipelineTemplate.yml@OfficePipelineTemplates
parameters:
pool:
name: Azure-Pipelines-1ESPT-ExDShared
image: windows-2022
os: windows
sdl:
eslint:
configuration: 'required'
parser: '@typescript-eslint/parser'
parserOptions: 'ecmaFeatures:{jsx:true}\necmaVersion:12\nsourceType:module\nproject:$(Build.SourcesDirectory)/tsconfig.common.json'
enableExclusions: true
exclusionPatterns": "*.d.ts\n*.spec.js\n*.spec.jsx\n*.spec.ts\n*.spec.tsx\n*.test.ts\n*.test.tsx"
customEnvironments: true
environmentsBrowser: true
environmentsNode: true
environmentsCommonJs: true
environmentsSharedNodeBrowser: false
environmentsEs6: false
environmentsEs2017: false
environmentsEs2020: true
environmentsJest: false
sourceRepositoriesToScan:
include:
- repository: AppHostingSdk
- repository: AppHostingSdkV2
- repository: AppHostingSdkV3
- repository: AppHostingSdkV4
- repository: AndroidAppHostingSdk
- repository: IOSAppHostingSdk
codeql:
compiled:
enabled: false
justificationForDisabling: 'CodeQL has some known issues with arm64 macos. Disabling auto-injection and using manual task instead'
customBuildTags:
- ES365AIMigrationTooling
stages:
- stage: __default
jobs:
- job: Security
displayName: 'Security Tasks'
steps:
- template: tools/yaml-templates/security.yml@self
- job: Build
displayName: 'Build Test Publish'
steps:
- template: tools/yaml-templates/build-test-publish.yml@self
templateContext:
outputs:
- output: pipelineArtifact
displayName: 'Publish bundle analysis'
condition: and( in(variables['Agent.JobStatus'], 'Succeeded', 'SucceededWithIssues'), eq(variables['Build.Reason'], 'PullRequest'), eq(variables['System.PullRequest.TargetBranch'], 'main'))
targetPath: './common/temp/bundleAnalysis'
artifactName: '$(bundleArtifactName)'
- output: pipelineArtifact
displayName: 'Publish Test app artifacts'
targetPath: '$(Build.ArtifactStagingDirectory)\teams-test-app\$(Build.BuildId).zip'
artifactName: 'teams-test-app'
sbomBuildDropPath: '$(Build.ArtifactStagingDirectory)\teams-test-app'
sbomPackageName: 'teamstestappArtifact'
- output: pipelineArtifact
displayName: 'Publish CDN feed to build Artifacts'
targetPath: '$(Build.ArtifactStagingDirectory)\CDNFeed'
artifactName: 'CDNFeed'
- output: pipelineArtifact
displayName: 'Publish validDomains to Build Artifacts'
targetPath: '$(Build.ArtifactStagingDirectory)\validDomains'
artifactName: 'validDomains'
- output: pipelineArtifact
displayName: 'Publish NPM feed to Build Artifacts'
targetPath: '$(Build.ArtifactStagingDirectory)\NPMFeed'
artifactName: 'NPMFeed'
- output: pipelineArtifact
displayName: 'Publish Powershell Scripts to Build Artifacts'
targetPath: '$(Build.ArtifactStagingDirectory)\scripts'
artifactName: 'scripts'
- job: E2ETest1
displayName: 'E2E Test - Perf'
pool:
name: Azure-Pipelines-1ESPT-ExDShared
image: 'ubuntu-latest'
os: linux
steps:
- template: tools/yaml-templates/build-app-host.yml@self
parameters:
appHostGitPath: AppHostingSdk
- task: Bash@3
displayName: 'Run E2E Perf tests'
condition: succeeded()
inputs:
targetType: inline
script: 'pnpm exec ts-node tools/cli/runAppsWithE2ETests.ts --appUrl=https://localhost:4002 --reportFileName=e2e-tests-report-perf --envType=perf'
workingDirectory: '$(AppHostingSdkProjectDirectory)'
- task: PublishTestResults@2
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '**/e2e-tests-report*.xml'
testRunTitle: 'E2E Tests - Perf'
mergeTestResults: true
condition: succeededOrFailed()
- template: tools/yaml-templates/web-e2e-versions.yml@self
parameters:
AppHostingSdk: AppHostingSdk
versionBranch: 'Latest'
- template: tools/yaml-templates/web-e2e-versions.yml@self
parameters:
AppHostingSdk: AppHostingSdkV2
versionBranch: 'v2'
- template: tools/yaml-templates/web-e2e-versions.yml@self
parameters:
AppHostingSdk: AppHostingSdkV3
versionBranch: 'v3'
- template: tools/yaml-templates/web-e2e-versions.yml@self
parameters:
AppHostingSdk: AppHostingSdkV4
versionBranch: 'v4'
- job: E2ETestCDN
displayName: 'E2E Tests - CDN (only runs on release builds)'
# This test only runs after deployment from a release branch and the new CDN version has been deployed
# This check will run on the PR to merge the release branch back into main
condition: and(
eq(variables['Build.Reason'], 'PullRequest'),
startsWith(variables['System.PullRequest.SourceBranch'], 'release/'),
eq(variables['System.PullRequest.TargetBranch'], 'main')
)
pool:
name: Azure-Pipelines-1ESPT-ExDShared
image: 'ubuntu-latest'
os: linux
steps:
- template: tools/yaml-templates/build-app-host.yml@self
parameters:
appHostGitPath: AppHostingSdk
- task: CmdLine@2
displayName: 'Build Test App CDN'
inputs:
script: |
pnpm build-test-app-CDN
workingDirectory: '$(ClientSdkProjectDirectory)'
- bash: 'pnpm exec ts-node tools/cli/runAppsWithE2ETests.ts --useDataFromLocal=true --reportFileName=e2e-tests-report-cdn-script-tag --envType=cdnScriptTag'
displayName: 'Run E2E integration tests with local script tag on latest cdn bundles'
condition: succeeded()
workingDirectory: '$(AppHostingSdkProjectDirectory)'
enabled: true
- task: PublishTestResults@2
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '**/e2e-tests-report*.xml'
testRunTitle: 'E2E Tests - CDN'
mergeTestResults: true
condition: succeededOrFailed()
- job: E2ETestAndroidA
displayName: 'E2E Tests - Android - Plan A'
pool:
name: Azure Pipelines
image: macos-15
os: macOS
steps:
- template: tools/yaml-templates/android-test.yml@self
parameters:
androidAppHostingSdkGitPath: AndroidAppHostingSdk
shardNum: 2
shardIndex: 0
- job: E2ETestAndroidB
displayName: 'E2E Tests - Android - Plan B'
pool:
name: Azure Pipelines
image: macos-15
os: macOS
steps:
- template: tools/yaml-templates/android-test.yml@self
parameters:
androidAppHostingSdkGitPath: AndroidAppHostingSdk
shardNum: 2
shardIndex: 1
# Comment out all of iOS E2E tests in TJS side due to unknown E2E testing failures on CI
# - job: E2ETestIOS
# displayName: 'E2E Tests - IOS - Plan A'
# pool:
# name: Azure Pipelines
# image: macos-latest-internal
# os: macOS
# steps:
# - template: tools/yaml-templates/ios-test.yml@self
# parameters:
# iOSAppHostingSdkGitPath: IOSAppHostingSdk
# testPlan: iosE2ETestPlanA
# - job: E2ETestIOS2
# displayName: 'E2E Tests - IOS - Plan B'
# pool:
# name: Azure Pipelines
# image: macos-latest-internal
# os: macOS
# steps:
# - template: tools/yaml-templates/ios-test.yml@self
# parameters:
# iOSAppHostingSdkGitPath: IOSAppHostingSdk
# testPlan: iosE2ETestPlanB