-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
70 lines (61 loc) · 1.51 KB
/
.gitlab-ci.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
image: unitedclassifiedsapps/gitlab-ci-android-fastlane
before_script:
- ./accept_licenses.sh
- echo y | $ANDROID_HOME/tools/bin/sdkmanager 'tools'
- echo y | $ANDROID_HOME/tools/bin/sdkmanager 'platform-tools'
- echo y | $ANDROID_HOME/tools/bin/sdkmanager 'build-tools;'$ANDROID_BUILD_TOOLS
- echo y | $ANDROID_HOME/tools/bin/sdkmanager 'platforms;android-'$ANDROID_COMPILE_SDK
- echo y | $ANDROID_HOME/tools/bin/sdkmanager 'extras;android;m2repository'
- echo y | $ANDROID_HOME/tools/bin/sdkmanager 'extras;google;google_play_services'
- echo y | $ANDROID_HOME/tools/bin/sdkmanager 'extras;google;m2repository'
- bundle install
cache:
key: ${CI_PROJECT_ID}
paths:
- .gradle/
stages:
- build
- test
- quality_assurance
- deploy_beta
- deploy
build_job:
stage: build
script:
- fastlane dev
artifacts:
paths:
- app/build/outputs/
unit_tests:
stage: test
script:
- fastlane test
artifacts:
name: "reports_${CI_PROJECT_NAME}_${CI_BUILD_REF_NAME}"
when: on_failure
expire_in: 4 days
paths:
- app/build/reports/tests/
static_analysis:
stage: quality_assurance
script:
- ./gradlew check
artifacts:
name: "reports_${CI_PROJECT_NAME}_${CI_BUILD_REF_NAME}"
when: on_failure
expire_in: 4 days
paths:
- app/build/reports/
deploy_internal:
only:
- master
stage: deploy
script:
- fastlane android deploy
deploy_external:
only:
- beta
stage: deploy_beta
script:
- bundle exec fastlane android beta
when: manual