-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
77 lines (68 loc) · 1.44 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
71
72
73
74
75
76
image: unitedclassifiedsapps/gitlab-ci-android-fastlane
before_script:
- export GRADLE_USER_HOME=$(pwd)/.gradle
- chmod +x ./gradlew
- cd ./ci
- bundle install
variables:
LC_ALL: "en_US.UTF-8"
LANG: "en_US.UTF-8"
# each cached job will download and extract the cache
# at the beginning and upload the cache at the end (временно отключено)
#cache:
# key: ${CI_PROJECT_ID}
# paths:
# - .gradle/
stages:
- test
- deploy
test:lint:
stage: test
script:
- cd ..
- ./gradlew -Pci --console=plain :app:lintDebug -PbuildDir=lint
tags:
- android
test:detekt:
stage: test
script:
- cd ..
- ./gradlew -Pci --console=plain detekt
- ./gradlew -Pci --console=plain detektGrabSubprojectsReports
artifacts:
paths:
- reports/detekt/
tags:
- android
test:unit:
stage: test
script:
- cd ..
- ./gradlew -Pci --console=plain testDebugUnitTest
tags:
- android
deploy:debug:
stage: deploy
script:
- bundle exec fastlane start_build buildType:DEBUG
artifacts:
expire_in: 4 hours
paths:
- app/build/outputs/apk/*.apk
tags:
- android
only:
- /^debug_\d{1,3}\.\d{1,3}\/\d{1,3}$/
deploy:release:
stage: deploy
script:
- env
- bundle exec fastlane start_build buildType:RELEASE
artifacts:
expire_in: 4 hours
paths:
- app/build/outputs/apk/*.apk
tags:
- android
only:
- /^release_\d{1,3}\.\d{1,3}\/\d{1,3}$/