forked from reinaldo-web/App_DevOps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bitbucket-pipelines-2-fastlane.yml
86 lines (79 loc) · 2.61 KB
/
bitbucket-pipelines-2-fastlane.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
image: livetouch/android-build-box:latest
pipelines:
branches:
master:
- step:
name: Lint & Test
caches:
- gradle
- gradle-wrapper
script:
- echo $ANDROID_KEYSTORE_FILE | base64 -d > app/hello.keystore
- cp -r . /tmp
- bundle update fastlane
- fastlane install_plugins
- bundle install
- bundle exec fastlane test
artifacts:
- app/build/output/apk/**
- app/build/reports/**
- step:
name: Build
caches:
- gradle
- gradle-wrapper
script:
- echo $ANDROID_KEYSTORE_FILE | base64 -d > app/hello.keystore
- cp -r . /tmp
- bundle update fastlane
- fastlane install_plugins
- bundle install
- bundle exec fastlane build
- git add app/build.gradle
- git commit -m "Update version [skip ci]"
- git push
artifacts:
- app/build/outputs/apk/**
- step:
name: Publish to Firebase
deployment: Firebase
caches:
- gradle
- gradle-wrapper
script:
- echo $ANDROID_KEYSTORE_FILE | base64 -d > app/hello.keystore
- echo $FIREBASE_SERVICE_ACCOUNT_FILE | base64 -d > app/firebase-service-account-key.json
- cp -r . /tmp
- bundle update fastlane
- fastlane install_plugins
- bundle install
- bundle exec fastlane firebase
- step:
name: Publish to Internal
deployment: Internal
caches:
- gradle
- gradle-wrapper
script:
- echo $ANDROID_KEYSTORE_FILE | base64 -d > app/hello.keystore
- echo $GOOGLEPLAY_SERVICE_ACCOUNT_FILE | base64 -d > app/google-service-account-key.json
- cp -r . /tmp
- bundle update fastlane
- fastlane install_plugins
- bundle install
- bundle exec fastlane internal
- step:
name: Promote Internal to Alpha
deployment: Alpha
trigger: manual
caches:
- gradle
- gradle-wrapper
script:
- echo $ANDROID_KEYSTORE_FILE | base64 -d > app/hello.keystore
- echo $GOOGLEPLAY_SERVICE_ACCOUNT_FILE | base64 -d > app/google-service-account-key.json
- ./gradlew promoteArtifact --promote-track alpha
definitions:
caches:
fastlane: /usr/local/bin/fastlane
gradle-wrapper: ~/.gradle/wrapper