-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
72 lines (67 loc) · 2.03 KB
/
.drone.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
pipeline:
# Step 0: Notify team members about upcoming build
notify:
image: appleboy/drone-telegram:latest
secrets: [ telegram_token ]
to: "-1001092684628"
format: markdown
message: >
*{{repo.owner}}/{{repo.name}}:*
Preparing to start build {{build.number}}...
when:
event: push
# Step 1: Generate changelog for later use
changelog:
image: lawnchairlauncher/drone-changelog:latest
output: changelog.txt
volumes:
- /opt/drone/cache:/cache
when:
event: push
# Step 2: The actual point of all of this
build:
image: runmymind/docker-android-sdk:ubuntu-standalone
secrets: [ awareness_api_key, store_password, key_password ]
environment:
- MAJOR_MINOR=alpha
- TRAVIS=true
- TRAVIS_BUILD_NUMBER=${DRONE_BUILD_NUMBER}
- TRAVIS_EVENT_TYPE=${DRONE_BUILD_EVENT}
commands:
- bash ./gradlew assembleDebug
# Step 3: Upload to Telegram or Transfer.sh, depending on the event
deploy:
image: lawnchairlauncher/drone-telegram:latest
secrets: [ bot_token, channel_id, dev_channel_id ]
apk_path: app/build/outputs/apk/debug/app-debug.apk
mapping_path: app/build/outputs/mapping/debug/mapping.txt
channel_id: "-1001180711841"
environment:
- MAJOR_MINOR=${DRONE_BRANCH}
when:
event: push
status: success
upload:
image: divadsn/drone-transfer.sh:latest
upload: app/build/outputs/apk/debug/app-debug.apk
when:
event: pull_request
status: success
# Step 4: Notify team members about build status
telegram:
image: appleboy/drone-telegram:latest
secrets: [ telegram_token ]
to: "-1001092684628"
format: markdown
message: >
*{{repo.owner}}/{{repo.name}}:*
{{#success build.status}}
Build {{build.number}} succeeded. Good job mate!
{{else}}
Build {{build.number}} failed. Fix me please sir!
{{/success}}
when:
event: [ push, tag, deployment ]
status: [ failure, success ]
branches:
exclude: [ l10n_alpha2, v1-alpha ]