forked from ariya/hello-react-native
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
101 lines (85 loc) · 2.57 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
jobs:
- job: CodeQuality
pool:
vmImage: 'ubuntu-18.04'
steps:
- task: NodeTool@0
inputs:
versionSpec: '12.x'
displayName: 'Install Node.js'
- script: npm ci
displayName: 'npm ci'
- script: npm run static-code-analysis
displayName: 'npm run static-code-analysis'
- script: npm run dynamic-code-analysis
displayName: 'npm run dynamic-code-analysis'
- job: Android
dependsOn: CodeQuality
pool:
vmImage: 'macOS-latest'
steps:
- task: NodeTool@0
inputs:
versionSpec: '12.x'
displayName: 'Install Node.js'
- script: npm ci
displayName: 'npm ci'
- task: Gradle@2
displayName: 'Building Android apk (debug)...'
inputs:
workingDirectory: 'android/'
gradleWrapperFile: 'android/gradlew'
gradleOptions: '-Xmx3072m'
publishJUnitResults: false
testResultsFiles: '**/TEST-*.xml'
tasks: 'assembleDebug'
- task: CopyFiles@2
displayName: 'Copying .apk files...'
inputs:
contents: '**/*.apk'
targetFolder: '$(build.artifactStagingDirectory)'
- task: PublishBuildArtifacts@1
displayName: 'Archiving .apk...'
inputs:
pathToPublish: '$(build.artifactStagingDirectory)/android/app/build/outputs/apk/'
artifactName: 'apk'
artifactType: 'container'
- job: iOS
dependsOn: CodeQuality
pool:
vmImage: 'macOS-latest'
steps:
- task: NodeTool@0
inputs:
versionSpec: '12.x'
displayName: 'Install Node.js'
- script: npm ci
displayName: 'npm ci'
- task: CocoaPods@0
inputs:
workingDirectory: 'ios/'
- task: Xcode@5
displayName: 'Building iOS app (debug)...'
inputs:
actions: 'clean build archive'
sdk: 'iphoneos'
configuration: 'Debug'
xcWorkspacePath: 'ios/HelloReactNative.xcworkspace'
scheme: 'HelloReactNative'
xcodeVersion: '10'
signingOption: 'nosign'
useXcpretty: 'false'
exportPath: '$(agent.buildDirectory)/output/$(sdk)/$(configuration)'
packageApp: false
args: '-UseModernBuildSystem=NO -archivePath $(agent.buildDirectory)/HelloReactNative'
- task: ArchiveFiles@2
displayName: 'Compressing .xcarchive directory into a zip file'
inputs:
rootFolderOrFile: '$(agent.buildDirectory)/HelloReactNative.xcarchive/'
archiveFile: '$(build.artifactStagingDirectory)/HelloReactNative.xcarchive.zip'
- task: PublishBuildArtifacts@1
displayName: 'Archiving .xcarchive...'
inputs:
pathToPublish: '$(build.artifactStagingDirectory)/HelloReactNative.xcarchive.zip'
artifactName: 'xcarchive'
artifactType: 'container'