-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
347 lines (299 loc) · 10.7 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
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
# Node.js
# Build a general Node.js project with npm.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript
trigger:
- main
stages:
- stage: 'Test'
displayName: 'Test'
dependsOn: Build
condition: succeeded()
jobs:
- job: 'BuildAndroid'
displayName: 'Build Test App Android'
condition: eq(variables.DoBuildAndroid, true)
pool:
vmImage: ubuntu-latest
steps:
# - checkout: git://Docutain-SDK-Example-React-Native
- task: NodeTool@0
inputs:
versionSpec: '18.x'
displayName: 'Install Node.js'
- task: JavaToolInstaller@0
inputs:
versionSpec: '17'
jdkArchitectureOption: 'x64'
jdkSourceOption: 'PreInstalled'
- task: Npm@1
displayName: 'npm install from Feed'
inputs:
command: 'install'
verbose: true
customRegistry: 'useFeed'
customFeed: '922c1b3a-21ec-4e93-a785-ae06e6b57cce'
- script: |
npm install -g react-native-cli
displayName: 'Install react-native cli'
- task: CmdLine@2
inputs:
script: |
chmod +x ./android/gradlew
- script: |
npx react-native build-android --mode=release
displayName: 'Build release'
- task: BrowserStackConfig@0
inputs:
BrowserStackServiceEndPoint: 'BrowserStack Connection'
- task: BrowserStackAppUploader@0
inputs:
appPath: '$(Build.Repository.LocalPath)/android/app/build/outputs/bundle/release/app-release.aab'
appCustomId: 'com.docutain_sdk_example_react_native'
- task: PublishPipelineArtifact@1
inputs:
targetPath: '$(Build.Repository.LocalPath)/android/app/build/outputs/bundle/release/app-release.aab'
artifact: 'com.docutain_sdk_example_react_native'
publishLocation: 'pipeline'
- job: 'TestAndroid'
displayName: 'NUnit Test Android'
dependsOn: BuildAndroid
condition: eq(variables.DoTestAndroid, true)
pool:
vmImage: ubuntu-latest
steps:
# - checkout: git://Docutain SDK/AppiumTestDocutainSDK
- task: UseDotNet@2
displayName: 'Install .NET Core SDK'
inputs:
version: 5.x
packageType: sdk
performMultiLevelLookup: true
includePreviewVersions: true # Required for preview versions
- task: DotNetCoreCLI@2
inputs:
command: 'build'
projects: 'BrowserStack/BrowserStack.csproj'
displayName: 'Build NUint Test'
- task: BrowserStackConfig@0
inputs:
BrowserStackServiceEndPoint: 'BrowserStack Connection'
browserstackLocal: true
bsLocalOptions: 'verbose'
- task: DownloadPipelineArtifact@2
continueOnError: true
inputs:
buildType: 'specific'
project: '17062a62-977d-4b6d-a8eb-3f67a5730b2b'
definition: '20'
specificBuildWithTriggering: true
buildVersionToDownload: 'latest'
targetPath: '$(Pipeline.Workspace)'
- task: DownloadPipelineArtifact@2
inputs:
buildType: current
targetPath: '$(Pipeline.Workspace)'
# file listing macos
# - task: CmdLine@2
# displayName: 'List files'
# inputs:
# script: |
# find -f $(Pipeline.Workspace)/*
- script: echo $BROWSERSTACK_APP_ID
displayName: 'BROWSERSTACK_APP_ID 1'
# file ubuntu
- task: CmdLine@2
displayName: 'List files'
inputs:
script: find $(Pipeline.Workspace)
- task: CmdLine@2
continueOnError: true
displayName: 'CreateFolder '
inputs:
script: mkdir -p $(Agent.TempDirectory)/NUnit
- task: BrowserStackAppUploader@0
continueOnError: true
inputs:
appPath: '$(Pipeline.Workspace)/com.docutain_sdk_example_react_native/app-release.aab'
appCustomId: 'com.docutain_sdk_example_react_native'
- task: DotNetCoreCLI@2
displayName: 'Build NUint Test'
inputs:
command: 'test'
testRunTitle: 'Docutain.SDK.React-Native'
projects: 'BrowserStack/BrowserStack.csproj'
# arguments: '--filter FullyQualifiedName\!~ReportGeneration -- NUnit.TestOutputXml=TestXML -- NUnit.WorkDirectory=$(Agent.TempDirectory)'
arguments: ' -- NUnit.TestOutputXml=TestXML -- NUnit.WorkDirectory=$(Agent.TempDirectory)'
continueOnError: true
env:
DOCUTAIN_SDK_TESTAPP: 'react_nativeTestApp'
BROWSERSTACK_BUILD_NAME: azure-Docutain.SDK.React-Native-$(Build.BuildId)
# CAPABILITIES_FILENAME: capabilities.yml
# BROWSERSTACK_ANDROID_APP_ID: SimpleApp_Android
# BROWSERSTACK_IOS_APP_ID: SimpleApp_iOS
# BROWSERSTACK_APP_ID: <Test_App>
- task: PublishTestResults@2
inputs:
testResultsFormat: 'NUnit'
testResultsFiles: '**/B*.xml'
searchFolder: '$(Agent.TempDirectory)'
testRunTitle: 'Docutain.SDK.React-Native Android Azure Test Results'
# Wird aktuell nicht gefunden
- task: BrowserStackResults@1
inputs:
browserstackProduct: 'App Automate'
- job: 'BuildiOS'
timeoutInMinutes: 60
displayName: 'Build Test App iOS'
condition: eq(variables.DoBuildiOS, true)
pool:
vmImage: macOS-13
steps:
- checkout: git://Docutain-SDK-Example-React-Native
- task: NodeTool@0
inputs:
versionSpec: '18.x'
displayName: 'Install Node.js'
- task: Npm@1
displayName: 'npm install from Feed'
inputs:
command: 'install'
verbose: true
customRegistry: 'useFeed'
customFeed: '922c1b3a-21ec-4e93-a785-ae06e6b57cce'
- script: |
npm install -g react-native-cli
displayName: 'Install react-native cli'
# - script: |
# cd ios
# pod update boost --no-repo-update
# pod update RCT-Folly --no-repo-update
# displayName: 'Install react-native cli'
- task: InstallAppleCertificate@2
displayName: 'Install Apple Signing Certificate'
inputs:
certSecureFile: 'DocutainDevelopment.p12'
certPwd: 'Dt(&bZ17x=M4'
keychain: 'temp'
- task: InstallAppleProvisioningProfile@1
displayName: 'Install Apple Provisioning Profile'
inputs:
provisioningProfileLocation: 'secureFiles'
provProfileSecureFile: 'WildCardDevelopment.mobileprovision'
- task: CocoaPods@0
inputs:
workingDirectory: 'ios'
forceRepoUpdate: false
#- script: |
# npx react-native build-ios --mode=Release
# displayName: 'Build release'
- task: Xcode@5
inputs:
actions: 'build archive'
sdk: 'iphoneos'
xcWorkspacePath: 'ios/Docutain_SDK_Example_React_Native.xcworkspace'
scheme: 'Docutain_SDK_Example_React_Native'
packageApp: true
configuration: Release
exportPath: 'output'
exportOptions: 'specify'
exportTeamId: 'XTY88YGGDY'
signingOption: manual
signingIdentity: '$(APPLE_CERTIFICATE_SIGNING_IDENTITY)'
provisioningProfileUuid: '$(APPLE_PROV_PROFILE_UUID)'
xcodeVersion: default
teamId: 'XTY88YGGDY'
args: 'CODE_SIGNING_ALLOWED=No'
# file listing macos
- task: CmdLine@2
displayName: 'List files'
inputs:
script: |
find -f $(Build.Repository.LocalPath)/*
- task: BrowserStackConfig@0
inputs:
BrowserStackServiceEndPoint: 'BrowserStack Connection'
- task: BrowserStackAppUploader@0
inputs:
appPath: '$(Build.Repository.LocalPath)/output/Docutain_SDK_Example_React_Native.ipa'
appCustomId: 'iOS_com.docutain_sdk_example_react_native'
- task: PublishPipelineArtifact@1
inputs:
targetPath: '$(Build.Repository.LocalPath)/output/Docutain_SDK_Example_React_Native.ipa'
artifact: 'iOS_com.docutain_sdk_example_react_native'
publishLocation: 'pipeline'
- job: 'TestiOS'
displayName: 'NUnit Test iOS'
dependsOn: BuildiOS
condition: eq(variables.DoTestiOS, true)
pool:
vmImage: macOS-13
steps:
- checkout: git://Docutain SDK/AppiumTestDocutainSDK
- task: UseDotNet@2
displayName: 'Install .NET Core SDK'
inputs:
version: 5.x
packageType: sdk
performMultiLevelLookup: true
includePreviewVersions: true # Required for preview versions
- task: DotNetCoreCLI@2
inputs:
command: 'build'
projects: 'BrowserStack/BrowserStack.csproj'
displayName: 'Build NUint Test'
- task: BrowserStackConfig@0
inputs:
BrowserStackServiceEndPoint: 'BrowserStack Connection'
browserstackLocal: true
bsLocalOptions: 'verbose'
- task: DownloadPipelineArtifact@2
continueOnError: true
inputs:
buildType: 'specific'
project: '17062a62-977d-4b6d-a8eb-3f67a5730b2b'
definition: '20'
specificBuildWithTriggering: true
buildVersionToDownload: 'latest'
targetPath: '$(Pipeline.Workspace)'
- task: DownloadPipelineArtifact@2
inputs:
buildType: current
targetPath: '$(Pipeline.Workspace)'
# file listing macos
- task: CmdLine@2
displayName: 'List files'
inputs:
script: |
find -f $(Pipeline.Workspace)/*
- task: BrowserStackAppUploader@0
continueOnError: true
inputs:
appPath: '$(Pipeline.Workspace)/iOS_com.docutain_sdk_example_react_native/Docutain_SDK_Example_React_Native.ipa'
appCustomId: 'iOS_com.docutain_sdk_example_react_native'
- task: DotNetCoreCLI@2
displayName: 'Build NUint Test'
inputs:
command: 'test'
testRunTitle: 'Docutain.SDK.React-Native iOS'
projects: 'BrowserStack/BrowserStack.csproj'
# arguments: '--filter FullyQualifiedName\!~ReportGeneration -- NUnit.TestOutputXml=TestXML -- NUnit.WorkDirectory=$(Agent.TempDirectory)'
arguments: ' -- NUnit.TestOutputXml=TestXML -- NUnit.WorkDirectory=$(Agent.TempDirectory)'
continueOnError: true
env:
DOCUTAIN_SDK_TESTAPP: 'ios_react_nativeTestApp'
BROWSERSTACK_BUILD_NAME: azure-Docutain.SDK.React-Native-iOS-$(Build.BuildId)
# CAPABILITIES_FILENAME: capabilities.yml
# BROWSERSTACK_ANDROID_APP_ID: SimpleApp_Android
# BROWSERSTACK_IOS_APP_ID: SimpleApp_iOS
# BROWSERSTACK_APP_ID: <Test_App>
- task: PublishTestResults@2
inputs:
testResultsFormat: 'NUnit'
testResultsFiles: '**/B*.xml'
searchFolder: '$(Agent.TempDirectory)'
testRunTitle: 'Docutain.SDK.React-Native iOS Azure Test Results '
# Wird aktuell nicht gefunden
- task: BrowserStackResults@1
inputs:
browserstackProduct: 'App Automate'