-
Notifications
You must be signed in to change notification settings - Fork 7
/
azure-pipelines.yml
70 lines (66 loc) · 1.89 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
trigger:
- main
pr: none
pool:
vmImage: 'macos-latest'
variables:
- group: source-clear-credentials
- group: android-signing
- name: version_code
value: $[counter('versionCode', 410)]
- name: GRADLE_USER_HOME
value: $(Pipeline.Workspace)/.gradle
- name: deps_def_path
value: gradle/libs.versions.toml
- name: bundle_path
value: 'app/build/outputs/bundle/playStore/*.aab'
- name: apks_path
value: 'app/build/outputs/apk/**/*.apk'
steps:
- task: CacheBeta@1
inputs:
key: 'gradle_0 | "$(Agent.OS)" | $(deps_def_path)'
restoreKeys: gradle_0
path: $(GRADLE_USER_HOME)
displayName: Cache Gradle Files
- task: DownloadSecureFile@1
name: keystore
inputs:
secureFile: alfresco-android-mobile-keystore
- task: DownloadSecureFile@1
name: google_services
inputs:
secureFile: google-services-aca.json
- task: Gradle@2
inputs:
workingDirectory: ''
gradleWrapperFile: 'gradlew'
options: '--no-daemon'
publishJUnitResults: false
testResultsFiles: '**/TEST-*.xml'
tasks: 'assembleDebug bundlePlayStore'
env:
KEYSTORE_FILE: $(keystore.secureFilePath)
KEYSTORE_PASSWORD: $(keystore_password)
KEY_ALIAS: $(key_alias)
KEY_PASSWORD: $(key_password)
GOOGLE_SERVICES_FILE: $(google_services.secureFilePath)
- bash: |
curl -sSL https://download.sourceclear.com/ci.sh | sh
displayName: 'SourceClearCheck'
env:
SRCCLR_API_TOKEN: $(source_clear_token)
- task: CopyFiles@2
inputs:
contents: |
$(bundle_path)
$(apks_path)
targetFolder: '$(build.artifactStagingDirectory)'
flattenFolders: true
- task: PublishBuildArtifacts@1
- task: GooglePlayReleaseBundle@3
inputs:
applicationId: 'com.alfresco.content.app'
bundleFile: $(bundle_path)
serviceEndpoint: 'Play Store Publisher'
track: 'internal'