forked from logukavin/libatsc3-middleware-sample-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsample-app.yml
79 lines (67 loc) · 2.54 KB
/
sample-app.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
# Android
# Build your Android project with Gradle.
# Add steps that test, sign, and distribute the APK, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/android
#resources:
# pipelines:
# - pipeline: Middleware # Name of the pipeline resource
# source: Middleware # Name of the pipeline referenced by the pipeline resource
# # project: FabrikamProject # Required only if the source pipeline is in another project
# trigger: true # Run app-ci pipeline when any run of security-lib-ci completes
pool:
vmImage: 'ubuntu-latest'
variables:
- group: firebase
- group: keystore-properties
parameters:
- name: release_notes
displayName: Release notes
type: string
default: "CI build"
- name: tester_groups
displayName: Tester groups
type: string
default: middleware
values:
- middleware
- markone-handsets
steps:
- bash:
echo "y" | sudo $(ANDROID_SDK_ROOT)/tools/bin/sdkmanager --install "ndk;21.1.6352462" --sdk_root=${ANDROID_SDK_ROOT}
displayName: 'Setup NDK 21.1.6352462'
- task: CmdLine@2
inputs:
script: curl -sL firebase.tools | bash
displayName: 'Install firebase tools'
- task: MavenAuthenticate@0
displayName: 'Maven Authenticate'
inputs:
artifactsFeeds: 'middleware, nextgen'
- task: Gradle@2
inputs:
workingDirectory: 'sample-app'
gradleWrapperFile: 'gradlew'
javaHomeOption: 'JDKVersion'
gradleOptions: '-Xmx3072m'
publishJUnitResults: true
testResultsFiles: '**/TEST-*.xml'
options: '-PversionCode=$(Build.BuildId) -PstoreFile=$(storeFile) -Ppassword=$(password) -PkeyAlias=$(keyAlias) -PkeyPassword=$(keyPassword)'
tasks: 'clean assembleEmbeddedDebug'
displayName: gradlew build
- task: CopyFiles@2
displayName: 'Copy .apk files to artifact staging directory'
inputs:
SourceFolder: '$(system.defaultworkingdirectory)'
Contents: '**/*.apk'
flattenFolders: true
TargetFolder: '$(Build.ArtifactStagingDirectory)'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'
displayName: 'Publish Artifact: drop'
- task: CmdLine@2
inputs:
script: firebase appdistribution:distribute $(Build.ArtifactStagingDirectory)/*.apk --token "$(firebase-token)" --app $(middleware-token) --release-notes "${{ parameters.release_notes }}" --groups "${{ parameters.tester_groups }}"
displayName: 'Distribute app to Firebase'