-
Notifications
You must be signed in to change notification settings - Fork 424
/
.gitlab-ci.yml
92 lines (85 loc) · 2.32 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
image: alvrme/alpine-android:android-29
variables:
SIGNING_KEY: /builds/breadwallet/breadwallet-android/FakeSigningKey
SIGNING_PASSWORD: qwerty
SIGNING_ALIAS: key0
SIGNING_ALIAS_PASSWORD: qwerty
ORG_GRADLE_DAEMON: "false"
ORG_GRADLE_DEPENDENCY_VERIFICATION: "off"
ORG_GRADLE_CONSOLE: plain
cache:
key: ${CI_PROJECT_ID}-3
paths:
- ~/.gradle/
- /root/.gradle/
#detekt:
# stage: test
# script:
# - ./gradlew detekt
# only:
# - merge_requests
# artifacts:
# expose_as: "Detekt Report"
# paths:
# - app/build/reports/detekt/detekt.html
build:
stage: build
script:
- git submodule sync
- git submodule update --init --force --remote
- ./gradlew build -xlint -xdetekt
only:
- develop
- master
- /^release.*$/
- merge_requests
artifacts:
paths:
- app/build/outputs/apk/brd/debug/
- app/build/outputs/apk/brd/release/
- app/build/outputs/apk/brdTestnet/debug/
- app/build/outputs/apk/brdTestnet/release/
reports:
junit: ./**/build/test-results/**/TEST-*.xml
deploy-appetize:
stage: deploy
needs: [ "build" ]
script:
- git submodule sync
- git submodule update --init --force --remote
- ./gradlew appetizeUpload
only:
- merge_requests
environment:
name: Review $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
url: $NATIVE_REVIEW_URL?versionName=$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
on_stop: stop-review
stop-review:
stage: deploy
needs: [ "build" ]
variables:
GIT_SUBMODULE_STRATEGY: none
script:
- cd $CI_PROJECT_DIR; ./gradlew appetizeRemove -Pmerge=$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
when: manual
only:
- merge_requests
environment:
name: Review $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
action: stop
deploy-firebase:
stage: deploy
variables:
ORG_GRADLE_DEPENDENCY_VERIFICATION: "off"
script:
- git submodule sync
- git submodule update --init --force --remote
- ./gradlew assemble appDistributionUploadBrdRelease appDistributionUploadBrdTestnetRelease appDistributionUploadBrdDebug appDistributionUploadBrdTestnetDebug
rules:
- if: '$CI_COMMIT_TAG != null'
artifacts:
paths:
- app/build/outputs/apk/brd/debug/
- app/build/outputs/apk/brd/release/
- app/build/outputs/apk/brdTestnet/debug/
- app/build/outputs/apk/brdTestnet/release/