generated from firechip/android-app-tmpl
-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.yml
62 lines (57 loc) · 2.09 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
# 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
trigger:
branches:
include:
- master
pr:
- master
pool:
vmImage: 'macos-latest'
variables:
- group: sampleapp-keystore
steps:
- task: Gradle@2
inputs:
gradleWrapperFile: '$(Build.Repository.LocalPath)/gradlew'
workingDirectory: '$(Build.Repository.LocalPath)'
tasks: 'clean build test assembleRelease assembleDebug assembleAndroidTest'
publishJUnitResults: true
testResultsFiles: '**/TEST-*.xml'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.8'
gradleOptions: '-Xmx3072m'
sonarQubeRunAnalysis: false
- task: DownloadSecureFile@1
inputs:
secureFile: 'appcenter-sampleapp.keystore'
- task: AndroidSigning@3
inputs:
apkFiles: '$(Build.SourcesDirectory)/app/build/outputs/apk/release/*.apk'
apksignerKeystoreFile: 'appcenter-sampleapp.keystore'
apksignerKeystorePassword: '$(keystore-password)'
apksignerKeystoreAlias: '$(android-alias)'
apksignerKeyPassword: '$(android-key-password)'
- task: AppCenterTest@1
inputs:
appFile: '$(Build.SourcesDirectory)/app/build/outputs/apk/debug/*.apk'
artifactsDirectory: '$(Build.ArtifactStagingDirectory)/AppCenterTest'
frameworkOption: 'espresso'
espressoBuildDirectory: '$(Build.SourcesDirectory)/app/build/outputs/apk/androidTest/debug'
credentialsOption: 'serviceEndpoint'
serverEndpoint: 'App Center Token'
appSlug: 'XTCTeam/appcenter-sampleapp-android'
devices: 'ef7113b6'
localeOption: 'en_US'
- task: AppCenterDistribute@3
inputs:
serverEndpoint: 'App Center Token'
appSlug: 'XTCTeam/appcenter-sampleapp-android'
appFile: '$(Build.SourcesDirectory)/app/build/outputs/apk/release/*.apk'
symbolsOption: 'Android'
symbolsMappingTxtFile: '$(Build.SourcesDirectory)/app/build/outputs/mapping/release/mapping.txt'
releaseNotesOption: 'input'
releaseNotesInput: 'Release notes from Azure Pipelines Task'
destinationType: 'groups'