-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
51 lines (43 loc) · 984 Bytes
/
.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
image: "theimpulson/gitlab-ci-android:android-34"
before_script:
- export GRADLE_USER_HOME=$(pwd)/.gradle
- chmod +x ./gradlew
cache:
key: ${CI_PROJECT_ID}
paths:
- .gradle/
stages:
- build
# - test
- notify
# lintDebug:
# stage: build
# script:
# - ./gradlew -Pci --console=plain :app:lintDebug -PbuildDir=lint
assembleDebug:
stage: build
script:
- script -c "bash -x ci-notify.sh --build" > ci-logs.log
- ./gradlew assembleDebug
artifacts:
paths:
- app/build/outputs/
- ci-logs.log
# testDebug:
# stage: test
# script:
# - ./gradlew -Pci --console=plain :app:testDebug
# Once build finished or failed, notify using Telegram
notifyTelegram:
stage: notify
script:
- script -c "bash -x ci-notify.sh --notify" > ci-logs.log # build succeeded with apk file attached or failed
artifacts:
paths:
- ci-logs.log
# if all build fails send log
sendLogs:
stage: notify
script:
- sh ci-notify.sh --logs
when: on_failure